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 [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/isearch.el [emacs-unicode-2]
Date: Thu, 09 Sep 2004 08:19:18 -0400

Index: emacs/lisp/isearch.el
diff -c emacs/lisp/isearch.el:1.221.2.6 emacs/lisp/isearch.el:1.221.2.7
*** emacs/lisp/isearch.el:1.221.2.6     Sat Sep  4 09:14:25 2004
--- emacs/lisp/isearch.el       Thu Sep  9 09:36:31 2004
***************
*** 2358,2366 ****
            isearch-lazy-highlight-case-fold-search isearch-case-fold-search
            isearch-lazy-highlight-regexp       isearch-regexp
              isearch-lazy-highlight-wrapped      nil)
!       (setq isearch-lazy-highlight-timer
!             (run-with-idle-timer isearch-lazy-highlight-initial-delay nil
!                                  'isearch-lazy-highlight-update)))))
  
  (defun isearch-lazy-highlight-search ()
    "Search ahead for the next or previous match, for lazy highlighting.
--- 2358,2367 ----
            isearch-lazy-highlight-case-fold-search isearch-case-fold-search
            isearch-lazy-highlight-regexp       isearch-regexp
              isearch-lazy-highlight-wrapped      nil)
!       (unless (equal isearch-string "")
!       (setq isearch-lazy-highlight-timer
!             (run-with-idle-timer isearch-lazy-highlight-initial-delay nil
!                                  'isearch-lazy-highlight-update))))))
  
  (defun isearch-lazy-highlight-search ()
    "Search ahead for the next or previous match, for lazy highlighting.
***************
*** 2397,2403 ****
                  (let ((mb (match-beginning 0))
                        (me (match-end 0)))
                    (if (= mb me)      ;zero-length match
!                       (forward-char 1)
  
                      ;; non-zero-length match
                      (let ((ov (make-overlay mb me)))
--- 2398,2414 ----
                  (let ((mb (match-beginning 0))
                        (me (match-end 0)))
                    (if (= mb me)      ;zero-length match
!                     (if isearch-forward
!                         (if (= mb (if isearch-lazy-highlight-wrapped
!                                       isearch-lazy-highlight-start
!                                     (window-end)))
!                             (setq found nil)
!                           (forward-char 1))
!                       (if (= mb (if isearch-lazy-highlight-wrapped
!                                     isearch-lazy-highlight-end
!                                   (window-start)))
!                           (setq found nil)
!                         (forward-char -1)))
  
                      ;; non-zero-length match
                      (let ((ov (make-overlay mb me)))
***************
*** 2407,2425 ****
                        (push ov isearch-lazy-highlight-overlays)))
                    (if isearch-forward
                        (setq isearch-lazy-highlight-end (point))
!                     (setq isearch-lazy-highlight-start (point))))
  
!               ;; not found
!               (if isearch-lazy-highlight-wrapped
!                   (setq looping nil
!                         nomore  t)
!                 (setq isearch-lazy-highlight-wrapped t)
!                 (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 isearch-lazy-highlight-interval nil
--- 2418,2437 ----
                        (push ov isearch-lazy-highlight-overlays)))
                    (if isearch-forward
                        (setq isearch-lazy-highlight-end (point))
!                     (setq isearch-lazy-highlight-start (point)))))
  
!           ;; not found or zero-length match at the search bound
!           (if (not found)
!               (if isearch-lazy-highlight-wrapped
!                   (setq looping nil
!                         nomore  t)
!                 (setq isearch-lazy-highlight-wrapped t)
!                 (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 isearch-lazy-highlight-interval nil




reply via email to

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