From 201d895a4a7bb8bc4370d87aead05e12540cf93b Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 21 May 2010 01:49:53 +0300 Subject: [PATCH] * replace.el (replace-highlight): Fix lazy-highlighting for `M-s w str M-% str RET'. --- lisp/ChangeLog | 5 +++++ lisp/replace.el | 3 +++ 2 files changed, 8 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4735ee6000b..1f2d78e92c8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-05-20 Juri Linkov + + * replace.el (replace-highlight): Fix lazy-highlighting + for `M-s w str M-% str RET'. + 2009-12-15 Masatake YAMATO * isearch.el (isearch-yank-word-or-char): Pull next subword diff --git a/lisp/replace.el b/lisp/replace.el index 487974073aa..d73692ccc20 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1980,6 +1980,9 @@ make, or the user didn't cancel the call." (isearch-regexp regexp) (search-whitespace-regexp nil) (isearch-case-fold-search case-fold)) + ;; 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 ()