Function: ConTeXt-outline-level
ConTeXt-outline-level is a byte-compiled function defined in
context.el.
Signature
(ConTeXt-outline-level)
Documentation
Find the level of current outline heading in an ConTeXt document.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/context.el
;; The top headings are \starttext, \startfrontmatter, \startbodymatter etc.
;; \part, \chapter etc. are children of that.
(defun ConTeXt-outline-level ()
"Find the level of current outline heading in an ConTeXt document."
(cond ((looking-at (concat (ConTeXt-header-end) "\\b")) 1)
((looking-at (concat (ConTeXt-trailer-start) "\\b")) 1)
((TeX-look-at TeX-outline-extra)
(max 1 (+ (TeX-look-at TeX-outline-extra)
(ConTeXt-outline-offset))))
(t
(save-excursion
(skip-chars-forward " \t")
(forward-char 1)
(cond ((looking-at (ConTeXt-start-environment-regexp
ConTeXt-section-block-list)) 1)
((TeX-look-at ConTeXt-section-list)
(max 1 (+ (TeX-look-at ConTeXt-section-list)
(ConTeXt-outline-offset))))
(t
(error "Unrecognized header")))))))