Function: allout-previous-heading

allout-previous-heading is a byte-compiled function defined in allout.el.gz.

Signature

(allout-previous-heading)

Documentation

Move to the prior (possibly invisible) heading line.

Return the location of the beginning of the heading, or nil if not found.

We skip anomalous low-level topics, a la allout-aberrant-container-p.

Source Code

;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_   > allout-previous-heading ()
(defun allout-previous-heading ()
  "Move to the prior (possibly invisible) heading line.

Return the location of the beginning of the heading, or nil if not found.

We skip anomalous low-level topics, a la `allout-aberrant-container-p'."

  (if (bobp)
      nil
    (let ((start-point (point)))
      ;; allout-goto-prefix-doublechecked calls us, so we can't use it here.
      (allout-goto-prefix)
      (save-match-data
        (when (or (re-search-backward allout-line-boundary-regexp nil 0)
                  (looking-at allout-bob-regexp))
          (goto-char (allout-prefix-data))
          (if (and (allout-do-doublecheck)
                   (allout-aberrant-container-p))
              (or (allout-previous-heading)
                  (and (goto-char start-point)
                       ;; recalibrate allout-recent-*:
                       (allout-depth)
                       nil))
            (point)))))))