aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorEli Zaretskii2022-04-21 14:54:45 +0300
committerEli Zaretskii2022-04-21 14:54:45 +0300
commit16d1ab02af3335db38e596cfe8ff9c3d1db157ed (patch)
tree855958a6450285613851cc20d7607b0f42771c59 /lisp/replace.el
parent4d4f5640ef0f1501bab174ae8d1b3759ba2b6ccc (diff)
downloademacs-16d1ab02af3335db38e596cfe8ff9c3d1db157ed.tar.gz
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/replace.el')
-rw-r--r--lisp/replace.el17
1 files changed, 14 insertions, 3 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index b1cfd7e3f42..dd1bdae4c54 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -357,7 +357,9 @@ should a regexp."
357(defun query-replace (from-string to-string &optional delimited start end backward region-noncontiguous-p) 357(defun query-replace (from-string to-string &optional delimited start end backward region-noncontiguous-p)
358 "Replace some occurrences of FROM-STRING with TO-STRING. 358 "Replace some occurrences of FROM-STRING with TO-STRING.
359As each match is found, the user must type a character saying 359As each match is found, the user must type a character saying
360what to do with it. For directions, type \\[help-command] at that time. 360what to do with it. Type SPC or `y' to replace the match,
361DEL or `n' to skip and go to the next match. For more directions,
362type \\[help-command] at that time.
361 363
362In Transient Mark mode, if the mark is active, operate on the contents 364In Transient Mark mode, if the mark is active, operate on the contents
363of the region. Otherwise, operate from point to the end of the buffer's 365of the region. Otherwise, operate from point to the end of the buffer's
@@ -427,7 +429,9 @@ To customize possible responses, change the bindings in `query-replace-map'."
427(defun query-replace-regexp (regexp to-string &optional delimited start end backward region-noncontiguous-p) 429(defun query-replace-regexp (regexp to-string &optional delimited start end backward region-noncontiguous-p)
428 "Replace some things after point matching REGEXP with TO-STRING. 430 "Replace some things after point matching REGEXP with TO-STRING.
429As each match is found, the user must type a character saying 431As each match is found, the user must type a character saying
430what to do with it. For directions, type \\[help-command] at that time. 432what to do with it. Type SPC or `y' to replace the match,
433DEL or `n' to skip and go to the next match. For more directions,
434type \\[help-command] at that time.
431 435
432In Transient Mark mode, if the mark is active, operate on the contents 436In Transient Mark mode, if the mark is active, operate on the contents
433of the region. Otherwise, operate from point to the end of the buffer's 437of the region. Otherwise, operate from point to the end of the buffer's
@@ -524,7 +528,9 @@ Interactive use of this function is deprecated in favor of the
524using `search-forward-regexp' and `replace-match' is preferred. 528using `search-forward-regexp' and `replace-match' is preferred.
525 529
526As each match is found, the user must type a character saying 530As each match is found, the user must type a character saying
527what to do with it. For directions, type \\[help-command] at that time. 531what to do with it. Type SPC or `y' to replace the match,
532DEL or `n' to skip and go to the next match. For more directions,
533type \\[help-command] at that time.
528 534
529TO-EXPR is a Lisp expression evaluated to compute each replacement. It may 535TO-EXPR is a Lisp expression evaluated to compute each replacement. It may
530reference `replace-count' to get the number of replacements already made. 536reference `replace-count' to get the number of replacements already made.
@@ -610,6 +616,11 @@ Use \\<minibuffer-local-map>\\[next-history-element] \
610to pull the last incremental search regexp to the minibuffer 616to pull the last incremental search regexp to the minibuffer
611that reads REGEXP. 617that reads REGEXP.
612 618
619As each match is found, the user must type a character saying
620what to do with it. Type SPC or `y' to replace the match,
621DEL or `n' to skip and go to the next match. For more directions,
622type \\[help-command] at that time.
623
613A prefix argument N says to use each replacement string N times 624A prefix argument N says to use each replacement string N times
614before rotating to the next. 625before rotating to the next.
615Fourth and fifth arg START and END specify the region to operate on. 626Fourth and fifth arg START and END specify the region to operate on.