Function: allout-goto-prefix

allout-goto-prefix is a byte-compiled function defined in allout.el.gz.

Signature

(allout-goto-prefix)

Documentation

Put point at beginning of immediately containing outline topic.

Goes to most immediate subsequent topic if none immediately containing.

Not sensitive to topic visibility.

Returns the point at the beginning of the prefix, or nil if none.

Source Code

;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_   X allout-chart-spec (chart spec &optional exposing)
;; (defun allout-chart-spec (chart spec &optional exposing)
;;   "Not yet (if ever) implemented.

;; Produce exposure directives given topic/subtree CHART and an exposure SPEC.

;; Exposure spec indicates the locations to be exposed and the prescribed
;; exposure status.  Optional arg EXPOSING is an integer, with 0
;; indicating pending concealment, anything higher indicating depth to
;; which subtopic headers should be exposed, and negative numbers
;; indicating (negative of) the depth to which subtopic headers and
;; bodies should be exposed.

;; The produced list can have two types of entries.  Bare numbers
;; indicate points in the buffer where topic headers that should be
;; exposed reside.

;;  - bare negative numbers indicates that the topic starting at the
;;    point which is the negative of the number should be opened,
;;    including their entries.
;;  - bare positive values indicate that this topic header should be
;;    opened.
;;  - Lists signify the beginning and end points of regions that should
;;    be flagged, and the flag to employ.  (For concealment: `(\?r)', and
;;    exposure:"
;;   (while spec
;;     (cond ((listp spec)
;;         )
;;        )
;;     (setq spec (cdr spec)))
;;   )

;;;_  - Within Topic
;;;_   > allout-goto-prefix ()
(defun allout-goto-prefix ()
  "Put point at beginning of immediately containing outline topic.

Goes to most immediate subsequent topic if none immediately containing.

Not sensitive to topic visibility.

Returns the point at the beginning of the prefix, or nil if none."

  (save-match-data
    (let (done)
      (while (and (not done)
                  (search-backward "\n" nil 1))
        (forward-char 1)
        (if (looking-at allout-regexp)
            (setq done (allout-prefix-data))
          (forward-char -1)))
      (if (bobp)
          (cond ((looking-at allout-regexp)
                 (allout-prefix-data))
                ((allout-next-heading))
                (done))
        done))))