Function: org-activate-folds
org-activate-folds is a byte-compiled function defined in org.el.gz.
Signature
(org-activate-folds LIMIT)
Documentation
Arrange trailing newlines after folds to inherit face before the fold.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-activate-folds (limit)
"Arrange trailing newlines after folds to inherit face before the fold."
(let ((next-unfolded-newline (search-forward "\n" limit 'move)))
(while (and next-unfolded-newline (org-fold-folded-p) (not (eobp)))
(goto-char (org-fold-core-next-visibility-change nil limit))
(setq next-unfolded-newline (search-forward "\n" limit 'move)))
(when next-unfolded-newline
(org-with-wide-buffer
(when (and (> (match-beginning 0) (point-min))
(org-fold-folded-p (1- (match-beginning 0))))
(put-text-property
(match-beginning 0) (match-end 0)
'face
(get-text-property
(org-fold-previous-visibility-change
(1- (match-beginning 0)))
'face)))
t))))