Function: org-fold-core-get-folding-property-symbol

org-fold-core-get-folding-property-symbol is a byte-compiled function defined in org-fold-core.el.gz.

Signature

(org-fold-core-get-folding-property-symbol SPEC &optional BUFFER GLOBAL)

Documentation

Get folding text property using to store SPEC in current buffer or BUFFER.

If GLOBAL is non-nil, do not make the property unique in the BUFFER.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-fold-core.el.gz
(defsubst org-fold-core-get-folding-property-symbol (spec &optional buffer global)
  "Get folding text property using to store SPEC in current buffer or BUFFER.
If GLOBAL is non-nil, do not make the property unique in the BUFFER."
  (if (memql 'merge-folds org-fold-core--optimize-for-huge-buffers)
      (intern (format "%s-global" org-fold-core--spec-property-prefix))
    (intern (format (concat org-fold-core--spec-property-prefix "%s-%S")
                    (symbol-name spec)
                    ;; (sxhash buf) appears to be not constant over time.
                    ;; 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 (or global
                            (memql 'ignore-indirect org-fold-core--optimize-for-huge-buffers))
                        'global
                      (sxhash (buffer-name (or buffer (current-buffer)))))))))