]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/isearch.el (isearch-lazy-highlight-error): New variable.
authorJuri Linkov <juri@jurta.org>
Mon, 20 Dec 2010 01:18:15 +0000 (01:18 +0000)
committerJuri Linkov <juri@jurta.org>
Mon, 20 Dec 2010 01:18:15 +0000 (01:18 +0000)
(isearch-lazy-highlight-new-loop): Compare `isearch-error' and
`isearch-lazy-highlight-error'.  Set `isearch-lazy-highlight-error'
to the current value of `isearch-error' (Bug#7468).

lisp/ChangeLog
lisp/isearch.el

index 6002c388e90e4948ad4d0b6f747f23cb5898d1ca..25cc72d0b7f3874c4c7e0c3593560f6b3e8858b4 100644 (file)
@@ -1,3 +1,10 @@
+2010-12-20  Juri Linkov  <juri@jurta.org>
+
+       * isearch.el (isearch-lazy-highlight-error): New variable.
+       (isearch-lazy-highlight-new-loop): Compare `isearch-error' and
+       `isearch-lazy-highlight-error'.  Set `isearch-lazy-highlight-error'
+       to the current value of `isearch-error' (Bug#7468).
+
 2010-12-17  Chong Yidong  <cyd@stupidchicken.com>
 
        * help-fns.el (describe-variable): Don't emit trailing whitespace
index 3b04fa270b0b748ca5a67a0bec7c9be9f59d74c5..afc18cae12728cac938a74a3ea1f2d2822185146 100644 (file)
@@ -2579,6 +2579,7 @@ since they have special meaning in a regexp."
 (defvar isearch-lazy-highlight-regexp nil)
 (defvar isearch-lazy-highlight-space-regexp nil)
 (defvar isearch-lazy-highlight-forward nil)
+(defvar isearch-lazy-highlight-error nil)
 
 (defun lazy-highlight-cleanup (&optional force)
   "Stop lazy highlighting and remove extra highlighting from current buffer.
@@ -2620,9 +2621,13 @@ by other Emacs features."
                  (not (= (window-end)   ; Window may have been split/joined.
                         isearch-lazy-highlight-window-end))
                 (not (eq isearch-forward
-                         isearch-lazy-highlight-forward))))
+                         isearch-lazy-highlight-forward))
+                ;; In case we are recovering from an error.
+                (not (equal isearch-error
+                            isearch-lazy-highlight-error))))
     ;; something important did indeed change
     (lazy-highlight-cleanup t) ;kill old loop & remove overlays
+    (setq isearch-lazy-highlight-error isearch-error)
     (when (not isearch-error)
       (setq isearch-lazy-highlight-start-limit beg
            isearch-lazy-highlight-end-limit end)