Function: cperl-outline-level
cperl-outline-level is a byte-compiled function defined in
cperl-mode.el.gz.
Signature
(cperl-outline-level)
Documentation
Guess the outline level. 0 for a package, 1 for a sub.
In POD, returns the level of the current heading.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cperl-mode.el.gz
;; Suggested by Mark A. Hershberger
(defun cperl-outline-level ()
"Guess the outline level. 0 for a package, 1 for a sub.
In POD, returns the level of the current heading."
(looking-at outline-regexp)
(cond ((not (match-beginning 1)) 0) ; beginning-of-file
;; 2=package-group, 5=package-name 8=sub-name 16=head-level
((match-beginning 2) 0) ; package
((match-beginning 8) 1) ; sub
((match-beginning 16)
(- (char-after (match-beginning 16)) ?0)) ; headN ==> N
(t 5))) ; should not happen