Function: reftex-toc-promote-action
reftex-toc-promote-action is a byte-compiled function defined in
reftex-toc.el.gz.
Signature
(reftex-toc-promote-action X)
Documentation
Change the level of a TOC entry.
reftex--pro-or-de is assumed to be dynamically scoped into this function.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/reftex-toc.el.gz
(defun reftex-toc-promote-action (x)
"Change the level of a TOC entry.
`reftex--pro-or-de' is assumed to be dynamically scoped into this function."
(let* ((data (car x))
(name (nth 1 x))
(newname (nth 2 x))
(marker (nth 4 data)))
(with-current-buffer (marker-buffer marker)
(goto-char (marker-position marker))
(if (looking-at (concat "\\([ \t]*" reftex-section-pre-regexp "\\)" (regexp-quote name)))
(replace-match (concat "\\1" newname))
(error "Fatal error during %smotion" reftex--pro-or-de)))))