Function: reftex-toc-rescan
reftex-toc-rescan is an interactive and byte-compiled function defined
in reftex-toc.el.gz.
Signature
(reftex-toc-rescan &rest _)
Documentation
Regenerate the *toc* buffer by reparsing file of section at point.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/reftex-toc.el.gz
;; Rescanning the document and rebuilding the TOC buffer.
(defun reftex-toc-rescan (&rest _)
"Regenerate the *toc* buffer by reparsing file of section at point."
(interactive)
(if (and reftex-enable-partial-scans
(null current-prefix-arg))
(let* ((data (get-text-property (point) :data))
(what (car data))
(file (cond ((eq what 'toc) (nth 3 data))
((memq what '(eof bof file-error)) (nth 1 data))
((stringp what) (nth 3 data))
((eq what 'index) (nth 3 data))))
(line (+ (count-lines (point-min) (point)) (if (bolp) 1 0))))
(if (not file)
(error "Don't know which file to rescan. Try `C-u r'")
(put 'reftex-toc :reftex-line line)
(switch-to-buffer-other-window
(reftex-get-file-buffer-force file))
(setq current-prefix-arg '(4))
(let ((reftex--rebuilding-toc t))
(reftex-toc))))
(reftex-toc-Rescan))
(reftex-kill-temporary-buffers))