From 35f06221023133708f228167f88eb5350ba84dde Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Wed, 17 Jul 2024 09:11:04 +0530 Subject: [PATCH] Don't highlight regexp matches when using dired Q command * lisp/dired-aux.el (dired-do-query-replace-regexp): Turn off lazy highlighting when reading the regexp from the user to avoid highlighting regexp matches in the dired buffer. --- lisp/dired-aux.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index e06e36aaa75..8029074d5a4 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -3801,9 +3801,10 @@ dired-do-query-replace-regexp If you exit the query-replace loop (\\[keyboard-quit], RET or q), you can resume the query replace with the command \\[fileloop-continue]." (interactive - (let ((common - (query-replace-read-args - "Query replace regexp in marked files" t t))) + (let* ((query-replace-lazy-highlight) + (common + (query-replace-read-args + "Query replace regexp in marked files" t t))) (list (nth 0 common) (nth 1 common) (nth 2 common))) dired-mode) (dolist (file (dired-get-marked-files nil nil #'dired-nondirectory-p nil t)) -- 2.45.2