diff options
| author | Visuwesh | 2024-07-17 09:11:04 +0530 |
|---|---|---|
| committer | Juri Linkov | 2024-07-23 09:37:39 +0300 |
| commit | cc6324d9dca662ea0ca9439411f4852b85e18986 (patch) | |
| tree | 31ea41c15fd378138d4bd7bb6a9d21d128bdcb83 | |
| parent | 1519c758a5a62b10f355097b066f4b88d3762bc4 (diff) | |
| download | emacs-cc6324d9dca662ea0ca9439411f4852b85e18986.tar.gz emacs-cc6324d9dca662ea0ca9439411f4852b85e18986.zip | |
Don't highlight matches in dired query-replace commands
* lisp/dired-aux.el (dired-do-query-replace-regexp)
(dired-do-replace-regexp-as-diff)
(dired-do-find-regexp-and-replace): Turn off lazy highlighting
when reading the regexp from the user to avoid highlighting
regexp matches in the dired buffer. (bug#72147)
| -rw-r--r-- | lisp/dired-aux.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index e06e36aaa75..decd9702eaf 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -3801,9 +3801,10 @@ Third arg DELIMITED (prefix arg) means replace only word-delimited matches. | |||
| 3801 | If you exit the query-replace loop (\\[keyboard-quit], RET or q), you can | 3801 | If you exit the query-replace loop (\\[keyboard-quit], RET or q), you can |
| 3802 | resume the query replace with the command \\[fileloop-continue]." | 3802 | resume the query replace with the command \\[fileloop-continue]." |
| 3803 | (interactive | 3803 | (interactive |
| 3804 | (let ((common | 3804 | (let* ((query-replace-lazy-highlight) |
| 3805 | (query-replace-read-args | 3805 | (common |
| 3806 | "Query replace regexp in marked files" t t))) | 3806 | (query-replace-read-args |
| 3807 | "Query replace regexp in marked files" t t))) | ||
| 3807 | (list (nth 0 common) (nth 1 common) (nth 2 common))) | 3808 | (list (nth 0 common) (nth 1 common) (nth 2 common))) |
| 3808 | dired-mode) | 3809 | dired-mode) |
| 3809 | (dolist (file (dired-get-marked-files nil nil #'dired-nondirectory-p nil t)) | 3810 | (dolist (file (dired-get-marked-files nil nil #'dired-nondirectory-p nil t)) |
| @@ -3825,9 +3826,10 @@ Third arg DELIMITED (prefix arg) means replace only word-delimited matches. | |||
| 3825 | The replacements are displayed in the buffer *replace-diff* that | 3826 | The replacements are displayed in the buffer *replace-diff* that |
| 3826 | you can later apply as a patch after reviewing the changes." | 3827 | you can later apply as a patch after reviewing the changes." |
| 3827 | (interactive | 3828 | (interactive |
| 3828 | (let ((common | 3829 | (let* ((query-replace-lazy-highlight) |
| 3829 | (query-replace-read-args | 3830 | (common |
| 3830 | "Replace regexp as diff in marked files" t t))) | 3831 | (query-replace-read-args |
| 3832 | "Replace regexp as diff in marked files" t t))) | ||
| 3831 | (list (nth 0 common) (nth 1 common) (nth 2 common)))) | 3833 | (list (nth 0 common) (nth 1 common) (nth 2 common)))) |
| 3832 | (dired-post-do-command) | 3834 | (dired-post-do-command) |
| 3833 | (multi-file-replace-regexp-as-diff | 3835 | (multi-file-replace-regexp-as-diff |
| @@ -3901,7 +3903,8 @@ REGEXP should use constructs supported by your local `grep' command. | |||
| 3901 | Also see `query-replace' for user options that affect how this | 3903 | Also see `query-replace' for user options that affect how this |
| 3902 | function works." | 3904 | function works." |
| 3903 | (interactive | 3905 | (interactive |
| 3904 | (let ((common | 3906 | (let* ((query-replace-lazy-highlight) |
| 3907 | (common | ||
| 3905 | (query-replace-read-args | 3908 | (query-replace-read-args |
| 3906 | "Query replace regexp in marked files" t t))) | 3909 | "Query replace regexp in marked files" t t))) |
| 3907 | (list (nth 0 common) (nth 1 common))) | 3910 | (list (nth 0 common) (nth 1 common))) |