Function: outline-level
outline-level is a byte-compiled function defined in outline.el.gz.
Signature
(outline-level)
Documentation
Return the depth to which a statement is nested in the outline.
Point must be at the beginning of a header line.
This is actually either the level specified in outline-heading-alist
or else the number of characters matched by outline-regexp.
Probably introduced at or before Emacs version 19.20.
Source Code
;; Defined in /usr/src/emacs/lisp/outline.el.gz
;; This used to count columns rather than characters, but that made ^L
;; appear to be at level 2 instead of 1. Columns would be better for
;; tab handling, but the default regexp doesn't use tabs, and anyone
;; who changes the regexp can also redefine the outline-level variable
;; as appropriate.
(defun outline-level ()
"Return the depth to which a statement is nested in the outline.
Point must be at the beginning of a header line.
This is actually either the level specified in `outline-heading-alist'
or else the number of characters matched by `outline-regexp'."
(or (cdr (assoc (match-string 0) outline-heading-alist))
(- (match-end 0) (match-beginning 0))))