emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master ff1ee4e: Support lazy-highlight-buffer in Info (bug


From: Juri Linkov
Subject: [Emacs-diffs] master ff1ee4e: Support lazy-highlight-buffer in Info (bug#29321, bug#29360).
Date: Mon, 5 Nov 2018 16:11:36 -0500 (EST)

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

    Support lazy-highlight-buffer in Info (bug#29321, bug#29360).
    
    * lisp/isearch.el (isearch-lazy-highlight-point-min)
    (isearch-lazy-highlight-point-max): New variables.
    (isearch-lazy-highlight-new-loop): When lazy-highlight-buffer is
    non-nil, compare (point-min) with isearch-lazy-highlight-point-min,
    and (point-max) with isearch-lazy-highlight-point-max, for buffers
    like Info where narrowing changes the values point-min and point-max.
---
 lisp/isearch.el | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 580b3ac..42b3aa4 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -3202,6 +3202,8 @@ since they have special meaning in a regexp."
 (defvar isearch-lazy-highlight-window-group nil)
 (defvar isearch-lazy-highlight-window-start nil)
 (defvar isearch-lazy-highlight-window-end nil)
+(defvar isearch-lazy-highlight-point-min nil)
+(defvar isearch-lazy-highlight-point-max nil)
 (defvar isearch-lazy-highlight-buffer nil)
 (defvar isearch-lazy-highlight-case-fold-search nil)
 (defvar isearch-lazy-highlight-regexp nil)
@@ -3251,17 +3253,21 @@ by other Emacs features."
                          isearch-lax-whitespace))
                 (not (eq isearch-lazy-highlight-regexp-lax-whitespace
                          isearch-regexp-lax-whitespace))
-                (not (or lazy-highlight-buffer
-                         (= (window-group-start)
-                            isearch-lazy-highlight-window-start)))
-                (not (or lazy-highlight-buffer
-                         (= (window-group-end) ; Window may have been 
split/joined.
-                            isearch-lazy-highlight-window-end)))
                 (not (eq isearch-forward
                          isearch-lazy-highlight-forward))
                 ;; In case we are recovering from an error.
                 (not (equal isearch-error
-                            isearch-lazy-highlight-error))))
+                            isearch-lazy-highlight-error))
+                (not (if lazy-highlight-buffer
+                         (= (point-min)
+                            isearch-lazy-highlight-point-min)
+                       (= (window-group-start)
+                          isearch-lazy-highlight-window-start)))
+                (not (if lazy-highlight-buffer
+                         (= (point-max)
+                            isearch-lazy-highlight-point-max)
+                       (= (window-group-end) ; Window may have been 
split/joined.
+                          isearch-lazy-highlight-window-end)))))
     ;; something important did indeed change
     (lazy-highlight-cleanup t (not (equal isearch-string ""))) ;stop old timer
     (setq isearch-lazy-highlight-error isearch-error)
@@ -3274,6 +3280,8 @@ by other Emacs features."
           isearch-lazy-highlight-window-group (selected-window-group)
          isearch-lazy-highlight-window-start (window-group-start)
          isearch-lazy-highlight-window-end   (window-group-end)
+         isearch-lazy-highlight-point-min    (point-min)
+         isearch-lazy-highlight-point-max    (point-max)
          isearch-lazy-highlight-buffer       lazy-highlight-buffer
          ;; Start lazy-highlighting at the beginning of the found
          ;; match (`isearch-other-end').  If no match, use point.



reply via email to

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