emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/isearch.el


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/isearch.el
Date: Wed, 16 Feb 2005 04:41:02 -0500

Index: emacs/lisp/isearch.el
diff -c emacs/lisp/isearch.el:1.254 emacs/lisp/isearch.el:1.255
*** emacs/lisp/isearch.el:1.254 Tue Jan 11 23:03:01 2005
--- emacs/lisp/isearch.el       Wed Feb 16 09:41:02 2005
***************
*** 740,746 ****
    (setq ;; quit-flag nil  not for isearch-mode
     isearch-adjusted nil
     isearch-yank-flag nil)
!   (if isearch-lazy-highlight (isearch-lazy-highlight-new-loop))
    ;; We must prevent the point moving to the end of composition when a
    ;; part of the composition has just been searched.
    (setq disable-point-adjustment t))
--- 740,747 ----
    (setq ;; quit-flag nil  not for isearch-mode
     isearch-adjusted nil
     isearch-yank-flag nil)
!   (when isearch-lazy-highlight
!     (isearch-lazy-highlight-new-loop nil nil))
    ;; We must prevent the point moving to the end of composition when a
    ;; part of the composition has just been searched.
    (setq disable-point-adjustment t))
***************
*** 2314,2319 ****
--- 2315,2322 ----
  
  (defvar isearch-lazy-highlight-overlays nil)
  (defvar isearch-lazy-highlight-wrapped nil)
+ (defvar isearch-lazy-highlight-start-limit nil)
+ (defvar isearch-lazy-highlight-end-limit nil)
  (defvar isearch-lazy-highlight-start nil)
  (defvar isearch-lazy-highlight-end nil)
  (defvar isearch-lazy-highlight-timer nil)
***************
*** 2339,2348 ****
      (cancel-timer isearch-lazy-highlight-timer)
      (setq isearch-lazy-highlight-timer nil)))
  
! (defun isearch-lazy-highlight-new-loop ()
    "Cleanup any previous `lazy-highlight' loop and begin a new one.
! This happens when `isearch-update' is invoked (which can cause the
! search string to change or the window to scroll)."
    (when (and (null executing-kbd-macro)
               (sit-for 0)         ;make sure (window-start) is credible
               (or (not (equal isearch-string
--- 2342,2353 ----
      (cancel-timer isearch-lazy-highlight-timer)
      (setq isearch-lazy-highlight-timer nil)))
  
! (defun isearch-lazy-highlight-new-loop (beg end)
    "Cleanup any previous `lazy-highlight' loop and begin a new one.
! BEG and END specify the bounds within which highlighting should occur.
! This is called when `isearch-update' is invoked (which can cause the
! search string to change or the window to scroll).  It is also used
! by other Emacs features."
    (when (and (null executing-kbd-macro)
               (sit-for 0)         ;make sure (window-start) is credible
               (or (not (equal isearch-string
***************
*** 2360,2365 ****
--- 2365,2372 ----
      ;; something important did indeed change
      (isearch-lazy-highlight-cleanup t) ;kill old loop & remove overlays
      (when (not isearch-invalid-regexp)
+       (setq isearch-lazy-highlight-start-limit beg
+           isearch-lazy-highlight-end-limit end)
        (setq isearch-lazy-highlight-window       (selected-window)
              isearch-lazy-highlight-window-start (window-start)
              isearch-lazy-highlight-window-end   (window-end)
***************
*** 2382,2393 ****
      (funcall (isearch-search-fun)
               isearch-string
               (if isearch-forward
!                  (if isearch-lazy-highlight-wrapped
!                      isearch-lazy-highlight-start
!                    (window-end))
!                (if isearch-lazy-highlight-wrapped
!                    isearch-lazy-highlight-end
!                  (window-start)))
               t)))
  
  (defun isearch-lazy-highlight-update ()
--- 2389,2402 ----
      (funcall (isearch-search-fun)
               isearch-string
               (if isearch-forward
!                  (min (or isearch-lazy-highlight-end-limit (point-max))
!                     (if isearch-lazy-highlight-wrapped
!                         isearch-lazy-highlight-start
!                       (window-end)))
!                (max (or isearch-lazy-highlight-start-limit (point-min))
!                   (if isearch-lazy-highlight-wrapped
!                       isearch-lazy-highlight-end
!                     (window-start))))
               t)))
  
  (defun isearch-lazy-highlight-update ()
***************
*** 2446,2454 ****
                      (if isearch-forward
                          (progn
                            (setq isearch-lazy-highlight-end (window-start))
!                           (goto-char (window-start)))
                        (setq isearch-lazy-highlight-start (window-end))
!                       (goto-char (window-end)))))))
            (unless nomore
              (setq isearch-lazy-highlight-timer
                    (run-at-time lazy-highlight-interval nil
--- 2455,2465 ----
                      (if isearch-forward
                          (progn
                            (setq isearch-lazy-highlight-end (window-start))
!                           (goto-char (max (or 
isearch-lazy-highlight-start-limit (point-min))
!                                           (window-start))))
                        (setq isearch-lazy-highlight-start (window-end))
!                       (goto-char (min (or isearch-lazy-highlight-end-limit 
(point-max))
!                                       (window-end))))))))
            (unless nomore
              (setq isearch-lazy-highlight-timer
                    (run-at-time lazy-highlight-interval nil




reply via email to

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