Fix lax whitespace highlight during query-replace

* lisp/replace.el (query-replace-read-args): Add :lax-whitespace to
minibuffer-lazy-highlight-setup, so lazy highlight during
query-replace respects replace-lax-whitespace and
replace-regexp-lax-whitespace (bug#81131).

Copyright-paperwork-exempt: yes
This commit is contained in:
Zhengyi Fu 2026-05-27 10:03:36 +08:00 committed by Juri Linkov
parent 2e70b88623
commit c3babe4b89

View file

@ -369,6 +369,8 @@ should a regexp."
(replace--region-filter (replace--region-filter
(funcall region-extract-function 'bounds))) (funcall region-extract-function 'bounds)))
:highlight (and query-replace-lazy-highlight (not no-highlight)) :highlight (and query-replace-lazy-highlight (not no-highlight))
:lax-whitespace (if regexp-flag replace-regexp-lax-whitespace
replace-lax-whitespace)
:regexp regexp-flag :regexp regexp-flag
:regexp-function (or replace-regexp-function :regexp-function (or replace-regexp-function
delimited-flag delimited-flag