[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 107ce30: * lisp/isearch.el (isearch-lazy-highlight-

From: Juri Linkov
Subject: [Emacs-diffs] master 107ce30: * lisp/isearch.el (isearch-lazy-highlight-update): Remember timer object
Date: Wed, 18 Sep 2019 18:12:43 -0400 (EDT)

branch: master
commit 107ce3050fc37b9a13d8304ae1bb73fac9de5f61
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * lisp/isearch.el (isearch-lazy-highlight-update): Remember timer object
    in isearch-lazy-highlight-timer to cancel it in lazy-highlight-cleanup.
    (isearch-done): No need to set isearch-lazy-highlight-start to nil -
    it used to reset lazy-highlight loop like 
    but now other packages set isearch-lazy-highlight-last-string to nil to 
    lazy-highlight loop.
 lisp/isearch.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 9401e8c..ec51c2c 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1370,7 +1370,6 @@ NOPUSH is t and EDIT is t."
   (remove-hook 'post-command-hook 'isearch-post-command-hook)
   (remove-hook 'mouse-leave-buffer-hook 'isearch-mouse-leave-buffer)
   (remove-hook 'kbd-macro-termination-hook 'isearch-done)
-  (setq isearch-lazy-highlight-start nil)
   (when (buffer-live-p isearch--current-buffer)
     (with-current-buffer isearch--current-buffer
       (setq isearch--current-buffer nil)
@@ -3970,8 +3969,9 @@ Attempt to do the search exactly the way the pending 
Isearch would."
                  (if isearch-lazy-highlight-forward
                      (setq isearch-lazy-highlight-end (point-min))
                    (setq isearch-lazy-highlight-start (point-max)))
-                 (run-at-time lazy-highlight-interval nil
-                              'isearch-lazy-highlight-buffer-update))
+                 (setq isearch-lazy-highlight-timer
+                       (run-at-time lazy-highlight-interval nil
+                                    'isearch-lazy-highlight-buffer-update)))
              (setq isearch-lazy-highlight-timer
                    (run-at-time lazy-highlight-interval nil

reply via email to

[Prev in Thread] Current Thread [Next in Thread]