summaryrefslogtreecommitdiff
path: root/lisp/dired-aux.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-04-21 14:54:45 +0300
committerEli Zaretskii <eliz@gnu.org>2022-04-21 14:54:45 +0300
commit16d1ab02af3335db38e596cfe8ff9c3d1db157ed (patch)
tree855958a6450285613851cc20d7607b0f42771c59 /lisp/dired-aux.el
parent4d4f5640ef0f1501bab174ae8d1b3759ba2b6ccc (diff)
downloademacs-16d1ab02af3335db38e596cfe8ff9c3d1db157ed.tar.gz
emacs-16d1ab02af3335db38e596cfe8ff9c3d1db157ed.tar.bz2
emacs-16d1ab02af3335db38e596cfe8ff9c3d1db157ed.zip
Add minimum instructions to 'query-replace' commands
* lisp/vc/vc-dir.el (vc-dir-query-replace-regexp): * lisp/textmodes/reftex-global.el (reftex-query-replace-document): * lisp/progmodes/project.el (project-query-replace-regexp): * lisp/progmodes/etags.el (tags-query-replace): * lisp/progmodes/ebrowse.el (ebrowse-tags-query-replace): * lisp/isearch.el (isearch-query-replace, isearch-occur): * lisp/emulation/viper-cmd.el (viper-query-replace): * lisp/dired-aux.el (dired-do-query-replace-regexp) (dired-do-find-regexp-and-replace): * lisp/progmodes/xref.el (xref-query-replace-in-results): * lisp/replace.el (query-replace, query-replace-regexp) (query-replace-regexp-eval, map-query-replace-regexp): Add minimal instructions for dealing with matches, with a link to the command that shows the full instructions. (Bug#55050)
Diffstat (limited to 'lisp/dired-aux.el')
-rw-r--r--lisp/dired-aux.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 57155ec26dc..f16568f9190 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -3171,9 +3171,14 @@ To continue searching for next match, use command \\[fileloop-continue]."
;;;###autoload
(defun dired-do-query-replace-regexp (from to &optional delimited)
"Do `query-replace-regexp' of FROM with TO, on all marked files.
+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.
+
Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
-If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
-with the command \\[tags-loop-continue]."
+If you exit the query-replace loop (\\[keyboard-quit], RET or q), you can
+resume the query replace with the command \\[tags-loop-continue]."
(interactive
(let ((common
(query-replace-read-args
@@ -3240,6 +3245,11 @@ REGEXP should use constructs supported by your local `grep' command."
(defun dired-do-find-regexp-and-replace (from to)
"Replace matches of FROM with TO, in all marked files.
+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 no files are marked, use the file under point.
For any marked directory, matches in all of its files are replaced,