Function: org-adaptive-fill-paragraph-function

org-adaptive-fill-paragraph-function is a byte-compiled function defined in org.el.gz.

Signature

(org-adaptive-fill-paragraph-function)

Documentation

Compute a fill prefix for the current line in paragraph.

Return fill prefix, as a string, or nil if current line isn't meant to be filled. Use adaptive-fill-regexp, but ignore Org markup at the beginning of the line.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-adaptive-fill-paragraph-function ()
  "Compute a fill prefix for the current line in paragraph.
Return fill prefix, as a string, or nil if current line isn't meant to
be filled.  Use `adaptive-fill-regexp', but ignore Org markup at the
beginning of the line."
  (let ((context (org-element-context)))
    ;; Skip over markup symbols, if any.
    (defvar org-element-all-objects) ; org-element.el
    (when (and (org-element-type-p context org-element-all-objects)
               (org-element-contents-begin context)
               (> (org-element-contents-begin context)
                  (org-element-begin context)))
      (goto-char (org-element-contents-begin context)))
    ;; Delegate to `fill-match-adaptive-prefix' to handle
    ;; `adaptive-fill-regexp'.  *Assume* that
    ;; `fill-match-adaptive-prefix' matches at point.
    (let (adaptive-fill-function) (fill-match-adaptive-prefix))))