Function: reftex-query-replace-document
reftex-query-replace-document is an autoloaded, interactive and
byte-compiled function defined in reftex-global.el.gz.
Signature
(reftex-query-replace-document &optional FROM TO DELIMITED)
Documentation
Do query-replace-regexp of FROM with TO over the entire document.
Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
As each match is found, the user must type a character saying
what to do with it. Type SPC or y to replace the match,
DEL or n to skip and go to the next match. For more directions,
type <f1> (help-command) at that time.
If you exit (C-g (keyboard-quit), RET or q), you can resume the query replace
with the command M-x tags-loop-continue (tags-loop-continue).
No active TAGS table is required.
Probably introduced at or before Emacs version 23.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/reftex-global.el.gz
;;;###autoload
(defun reftex-query-replace-document (&optional from to delimited)
"Do `query-replace-regexp' of FROM with TO over the entire document.
Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
As each match is found, the user must type a character saying
what to do with it. Type SPC or `y' to replace the match,
DEL or `n' to skip and go to the next match. For more directions,
type \\[help-command] at that time.
If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
with the command \\[tags-loop-continue].
No active TAGS table is required."
(interactive)
(let ((default (reftex-this-word)))
(unless from
(setq from (read-string (format "Replace regexp in document [%s]: "
default)))
(if (string= from "") (setq from (regexp-quote default))))
(unless to
(setq to (read-string (format "Replace regexp %s with: " from))))
(reftex-access-scan-info current-prefix-arg)
(fileloop-initialize-replace
from to (reftex-all-document-files)
(if (equal from (downcase from)) nil 'default)
(or delimited current-prefix-arg))
(fileloop-continue)))