]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/replace.el (replace-highlight): Set isearch-word to nil unconditionally.
authorJuri Linkov <juri@jurta.org>
Sun, 11 Mar 2012 10:27:53 +0000 (12:27 +0200)
committerJuri Linkov <juri@jurta.org>
Sun, 11 Mar 2012 10:27:53 +0000 (12:27 +0200)
Fixes: debbugs:10887
lisp/ChangeLog
lisp/replace.el

index 338a8668e5689152c1e2c8e525a8c18c6eb7e5eb..56ebb5fc948105cc2354911582f99f0ad8e9a9e6 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-11  Juri Linkov  <juri@jurta.org>
+
+       * replace.el (replace-highlight): Set isearch-word to nil
+       unconditionally.  (Bug#10887)
+
 2012-03-10  Eli Zaretskii  <eliz@gnu.org>
 
        * net/mairix.el (mairix-replace-invalid-chars): Rename from
index 349e63d4201bdee5ac848a78692f09dcd0f7c747..9fbaa27907991fe585ebdc91bb8c257d88da5982 100644 (file)
@@ -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 ()