Function: allout-forward-current-level
allout-forward-current-level is an interactive and byte-compiled
function defined in allout.el.gz.
Signature
(allout-forward-current-level ARG)
Documentation
Position point at the next heading of the same level.
Takes optional repeat-count, goes backward if count is negative.
Returns resulting position, else nil if none found.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_ > allout-forward-current-level (arg)
(defun allout-forward-current-level (arg)
"Position point at the next heading of the same level.
Takes optional repeat-count, goes backward if count is negative.
Returns resulting position, else nil if none found."
(interactive "p")
(let ((start-depth (allout-current-depth))
(start-arg arg)
(backward (> 0 arg)))
(if (= 0 start-depth)
(error "No siblings, not in a topic"))
(if backward (setq arg (* -1 arg)))
(allout-back-to-current-heading)
(while (and (not (zerop arg))
(if backward
(allout-previous-sibling)
(allout-next-sibling)))
(setq arg (1- arg)))
(if (not (allout-called-interactively-p))
nil
(allout-end-of-prefix)
(if (not (zerop arg))
(error "Hit %s level %d topic, traversed %d of %d requested"
(if backward "first" "last")
allout-recent-depth
(- (abs start-arg) arg)
(abs start-arg))))))