branch: externals/org commit fe1f4f2ccf040deff9c57288d987f17cc2da321f Author: Ihor Radchenko <yanta...@gmail.com> Commit: Ihor Radchenko <yanta...@gmail.com>
fixup! org-fold-core: Respect 'ignore-indirect optimization better --- lisp/org-fold-core.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/org-fold-core.el b/lisp/org-fold-core.el index 628a73bbc3..20db3a0a46 100644 --- a/lisp/org-fold-core.el +++ b/lisp/org-fold-core.el @@ -461,7 +461,9 @@ If GLOBAL is non-nil, do not make the property unique in the BUFFER." ;; Using buffer-name is safe, since the only place where ;; buffer-local text property actually matters is an indirect ;; buffer, where the name cannot be same anyway. - (if global 'global + (if (or global + (memql 'ignore-indirect org-fold-core--optimise-for-huge-buffers)) + 'global (sxhash (buffer-name (or buffer (current-buffer))))))))) (defsubst org-fold-core-get-folding-spec-from-folding-prop (folding-prop) @@ -552,8 +554,7 @@ unless RETURN-ONLY is non-nil." org-fold-core--property-symbol-cache)))) (prog1 local-prop - (unless (or return-only - (memql 'ignore-indirect org-fold-core--optimise-for-huge-buffers)) + (unless return-only (with-current-buffer buf ;; Update folding properties carried over from other ;; buffer (implying that current buffer is indirect