Function: allout-next-heading

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

Signature

(allout-next-heading)

Documentation

Move to the heading for the topic (possibly invisible) after this one.

Returns the location of the heading, or nil if none 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-next-heading ()
(defsubst allout-next-heading ()
  "Move to the heading for the topic (possibly invisible) after this one.

Returns the location of the heading, or nil if none found.

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

    (if (looking-at allout-regexp)
        (forward-char 1))

    (when (re-search-forward allout-line-boundary-regexp nil 0)
      (allout-prefix-data)
      (goto-char allout-recent-prefix-beginning)
      (while (not (bolp))
        (forward-char -1))
      (and (allout-do-doublecheck)
           ;; this will set allout-recent-* on the first non-aberrant topic,
           ;; whether it's the current one or one that disqualifies it:
           (allout-aberrant-container-p))
      ;; this may or may not be the same as above depending on doublecheck:
      (goto-char allout-recent-prefix-beginning))))