diff options
| author | Eli Zaretskii | 2022-04-21 14:54:45 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2022-04-21 14:54:45 +0300 |
| commit | 16d1ab02af3335db38e596cfe8ff9c3d1db157ed (patch) | |
| tree | 855958a6450285613851cc20d7607b0f42771c59 /lisp/replace.el | |
| parent | 4d4f5640ef0f1501bab174ae8d1b3759ba2b6ccc (diff) | |
| download | emacs-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.el | 17 |
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. |
| 359 | As each match is found, the user must type a character saying | 359 | As each match is found, the user must type a character saying |
| 360 | what to do with it. For directions, type \\[help-command] at that time. | 360 | what to do with it. Type SPC or `y' to replace the match, |
| 361 | DEL or `n' to skip and go to the next match. For more directions, | ||
| 362 | type \\[help-command] at that time. | ||
| 361 | 363 | ||
| 362 | In Transient Mark mode, if the mark is active, operate on the contents | 364 | In Transient Mark mode, if the mark is active, operate on the contents |
| 363 | of the region. Otherwise, operate from point to the end of the buffer's | 365 | of 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. |
| 429 | As each match is found, the user must type a character saying | 431 | As each match is found, the user must type a character saying |
| 430 | what to do with it. For directions, type \\[help-command] at that time. | 432 | what to do with it. Type SPC or `y' to replace the match, |
| 433 | DEL or `n' to skip and go to the next match. For more directions, | ||
| 434 | type \\[help-command] at that time. | ||
| 431 | 435 | ||
| 432 | In Transient Mark mode, if the mark is active, operate on the contents | 436 | In Transient Mark mode, if the mark is active, operate on the contents |
| 433 | of the region. Otherwise, operate from point to the end of the buffer's | 437 | of 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 | |||
| 524 | using `search-forward-regexp' and `replace-match' is preferred. | 528 | using `search-forward-regexp' and `replace-match' is preferred. |
| 525 | 529 | ||
| 526 | As each match is found, the user must type a character saying | 530 | As each match is found, the user must type a character saying |
| 527 | what to do with it. For directions, type \\[help-command] at that time. | 531 | what to do with it. Type SPC or `y' to replace the match, |
| 532 | DEL or `n' to skip and go to the next match. For more directions, | ||
| 533 | type \\[help-command] at that time. | ||
| 528 | 534 | ||
| 529 | TO-EXPR is a Lisp expression evaluated to compute each replacement. It may | 535 | TO-EXPR is a Lisp expression evaluated to compute each replacement. It may |
| 530 | reference `replace-count' to get the number of replacements already made. | 536 | reference `replace-count' to get the number of replacements already made. |
| @@ -610,6 +616,11 @@ Use \\<minibuffer-local-map>\\[next-history-element] \ | |||
| 610 | to pull the last incremental search regexp to the minibuffer | 616 | to pull the last incremental search regexp to the minibuffer |
| 611 | that reads REGEXP. | 617 | that reads REGEXP. |
| 612 | 618 | ||
| 619 | As each match is found, the user must type a character saying | ||
| 620 | what to do with it. Type SPC or `y' to replace the match, | ||
| 621 | DEL or `n' to skip and go to the next match. For more directions, | ||
| 622 | type \\[help-command] at that time. | ||
| 623 | |||
| 613 | A prefix argument N says to use each replacement string N times | 624 | A prefix argument N says to use each replacement string N times |
| 614 | before rotating to the next. | 625 | before rotating to the next. |
| 615 | Fourth and fifth arg START and END specify the region to operate on. | 626 | Fourth and fifth arg START and END specify the region to operate on. |