Function: allout-sibling-index
allout-sibling-index is a byte-compiled function defined in
allout.el.gz.
Signature
(allout-sibling-index &optional DEPTH)
Documentation
Item number of this prospective topic among its siblings.
If optional arg DEPTH is greater than current depth, then we're opening a new level, and return 0.
If less than this depth, ascend to that depth and count...
Source Code
;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_ > allout-sibling-index (&optional depth)
(defun allout-sibling-index (&optional depth)
"Item number of this prospective topic among its siblings.
If optional arg DEPTH is greater than current depth, then we're
opening a new level, and return 0.
If less than this depth, ascend to that depth and count..."
(save-excursion
(cond ((and depth (<= depth 0) 0))
((or (null depth) (= depth (allout-depth)))
(let ((index 1))
(while (allout-previous-sibling allout-recent-depth nil)
(setq index (1+ index)))
index))
((< depth allout-recent-depth)
(allout-ascend-to-depth depth)
(allout-sibling-index))
(0))))