Function: meta-indent-level-count
meta-indent-level-count is a byte-compiled function defined in
meta-mode.el.gz.
Signature
(meta-indent-level-count)
Documentation
Count indentation change for begin-end commands in the current line.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/meta-mode.el.gz
(defun meta-indent-level-count ()
"Count indentation change for begin-end commands in the current line."
(save-excursion
(save-restriction
(let ((count 0))
(narrow-to-region
(point) (save-excursion
(re-search-forward "[^\\\"]%\\|\n\\|\\'" nil t)
(backward-char) (point)))
(while (re-search-forward "\\<\\sw+\\>\\|(\\|)" nil t)
(save-excursion
(goto-char (match-beginning 0))
(cond
;; Count number of begin-end keywords within line.
((meta-indent-looking-at-code
(concat "\\<" meta-begin-environment-regexp "\\>"))
(setq count (+ count meta-indent-level)))
((meta-indent-looking-at-code
(concat "\\<" meta-end-environment-regexp "\\>"))
(setq count (- count meta-indent-level))))))
count))))