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* ((query-replace-lazy-highlight)
- (common
- (query-replace-read-args
- "Query replace regexp in marked files" t t)))
+ (let ((common
+ (query-replace-read-args
+ "Query replace regexp in marked files" t 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))
The replacements are displayed in the buffer *replace-diff* that
you can later apply as a patch after reviewing the changes."
(interactive
- (let* ((query-replace-lazy-highlight)
- (common
- (query-replace-read-args
- "Replace regexp as diff in marked files" t t)))
+ (let ((common
+ (query-replace-read-args
+ "Replace regexp as diff in marked files" t t t)))
(list (nth 0 common) (nth 1 common) (nth 2 common))))
(dired-post-do-command)
(multi-file-replace-regexp-as-diff
Also see `query-replace' for user options that affect how this
function works."
(interactive
- (let* ((query-replace-lazy-highlight)
- (common
+ (let ((common
(query-replace-read-args
- "Query replace regexp in marked files" t t)))
+ "Query replace regexp in marked files" t t t)))
(list (nth 0 common) (nth 1 common)))
dired-mode)
(require 'xref)
to))
regexp-flag))
-(defun query-replace-read-args (prompt regexp-flag &optional noerror)
+(defun query-replace-read-args (prompt regexp-flag &optional noerror no-highlight)
(unless noerror
(barf-if-buffer-read-only))
(save-mark-and-excursion
:filter (when (use-region-p)
(replace--region-filter
(funcall region-extract-function 'bounds)))
- :highlight query-replace-lazy-highlight
+ :highlight (and query-replace-lazy-highlight (not no-highlight))
:regexp regexp-flag
:regexp-function (or replace-regexp-function
delimited-flag