Function: tex-current-defun-name
tex-current-defun-name is a byte-compiled function defined in
tex-mode.el.gz.
Signature
(tex-current-defun-name)
Documentation
Return the name of the TeX section/paragraph/chapter at point, or nil.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/tex-mode.el.gz
(defun tex-current-defun-name ()
"Return the name of the TeX section/paragraph/chapter at point, or nil."
(save-excursion
(when (re-search-backward
"\\\\\\(sub\\)*\\(section\\|paragraph\\|chapter\\)"
nil t)
(goto-char (match-beginning 0))
(buffer-substring-no-properties
(1+ (point)) ; without initial backslash
(line-end-position)))))