From 300e8fa5624c0670553c1215409c9d31075901d1 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 11 Mar 2012 12:27:53 +0200 Subject: [PATCH] * lisp/replace.el (replace-highlight): Set isearch-word to nil unconditionally. Fixes: debbugs:10887 --- lisp/ChangeLog | 5 +++++ lisp/replace.el | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 338a8668e56..56ebb5fc948 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-03-11 Juri Linkov + + * replace.el (replace-highlight): Set isearch-word to nil + unconditionally. (Bug#10887) + 2012-03-10 Eli Zaretskii * net/mairix.el (mairix-replace-invalid-chars): Rename from diff --git a/lisp/replace.el b/lisp/replace.el index 349e63d4201..9fbaa279079 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -2116,13 +2116,13 @@ make, or the user didn't cancel the call." (if query-replace-lazy-highlight (let ((isearch-string string) (isearch-regexp regexp) + ;; Set isearch-word to nil because word-replace is regexp-based, + ;; so `isearch-search-fun' should not use `word-search-forward'. + (isearch-word nil) (search-whitespace-regexp nil) (isearch-case-fold-search case-fold) (isearch-forward t) (isearch-error nil)) - ;; Set isearch-word to nil because word-replace is regexp-based, - ;; so `isearch-search-fun' should not use `word-search-forward'. - (if (and isearch-word isearch-regexp) (setq isearch-word nil)) (isearch-lazy-highlight-new-loop range-beg range-end)))) (defun replace-dehighlight () -- 2.39.2