Function: allout-auto-fill

allout-auto-fill is a byte-compiled function defined in allout.el.gz.

Signature

(allout-auto-fill)

Documentation

allout-mode(var)/allout-mode(fun) autofill function.

Maintains outline hanging topic indentation if allout-use-hanging-indents is set.

Source Code

;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_    > allout-auto-fill ()
(defun allout-auto-fill ()
  "`allout-mode' autofill function.

Maintains outline hanging topic indentation if
`allout-use-hanging-indents' is set."

  (when (and (not allout-inhibit-auto-fill)
             (or (not allout-inhibit-auto-fill-on-headline)
                 (not (allout-on-current-heading-p))))
    (let ((fill-prefix (if allout-use-hanging-indents
                           ;; Check for topic header indentation:
                           (save-match-data
                             (save-excursion
                               (beginning-of-line)
                               (if (looking-at allout-regexp)
                                   ;; ... construct indentation to account for
                                   ;; length of topic prefix:
                                   (make-string (progn (allout-end-of-prefix)
                                                       (current-column))
                                                ?\ ))))))
          (use-auto-fill-function
           (if (and (eq allout-outside-normal-auto-fill-function
                        'allout-auto-fill)
                    (eq auto-fill-function 'allout-auto-fill))
               'do-auto-fill
             (or allout-outside-normal-auto-fill-function
                 auto-fill-function))))
      (if (or allout-former-auto-filler allout-use-hanging-indents)
          (funcall use-auto-fill-function)))))