Function: LaTeX--strip-labels
LaTeX--strip-labels is a byte-compiled function defined in latex.el.
Signature
(LaTeX--strip-labels)
Documentation
Remove label commands between point and end of buffer.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/latex.el
(defun LaTeX--strip-labels ()
"Remove label commands between point and end of buffer."
(let ((re (concat
"\\(?:"
(if (bound-and-true-p reftex-label-regexps)
(mapconcat #'identity reftex-label-regexps "\\|")
(format "%slabel%s%s%s"
(regexp-quote TeX-esc)
TeX-grop "[^}]*" TeX-grcl))
"\\)")))
(save-excursion
(while (re-search-forward re nil t)
(replace-match "")
(when (save-excursion (beginning-of-line)
(looking-at "[ \t]*$"))
;; Delete current line if it is empty.
(delete-region (line-beginning-position 1) (line-beginning-position 2)))))))