/[emacs]/emacs/lisp/isearch.el
ViewVC logotype

Diff of /emacs/lisp/isearch.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.212.2.12 by miles, Sat Sep 4 09:28:13 2004 UTC revision 1.212.2.13 by miles, Thu Sep 16 00:12:21 2004 UTC
# Line 2362  search string to change or the window to Line 2362  search string to change or the window to
2362              isearch-lazy-highlight-case-fold-search isearch-case-fold-search              isearch-lazy-highlight-case-fold-search isearch-case-fold-search
2363              isearch-lazy-highlight-regexp       isearch-regexp              isearch-lazy-highlight-regexp       isearch-regexp
2364              isearch-lazy-highlight-wrapped      nil)              isearch-lazy-highlight-wrapped      nil)
2365        (setq isearch-lazy-highlight-timer        (unless (equal isearch-string "")
2366              (run-with-idle-timer isearch-lazy-highlight-initial-delay nil          (setq isearch-lazy-highlight-timer
2367                                   'isearch-lazy-highlight-update)))))                (run-with-idle-timer isearch-lazy-highlight-initial-delay nil
2368                                       'isearch-lazy-highlight-update))))))
2369    
2370  (defun isearch-lazy-highlight-search ()  (defun isearch-lazy-highlight-search ()
2371    "Search ahead for the next or previous match, for lazy highlighting.    "Search ahead for the next or previous match, for lazy highlighting.
# Line 2401  Attempt to do the search exactly the way Line 2402  Attempt to do the search exactly the way
2402                  (let ((mb (match-beginning 0))                  (let ((mb (match-beginning 0))
2403                        (me (match-end 0)))                        (me (match-end 0)))
2404                    (if (= mb me)      ;zero-length match                    (if (= mb me)      ;zero-length match
2405                        (forward-char 1)                        (if isearch-forward
2406                              (if (= mb (if isearch-lazy-highlight-wrapped
2407                                            isearch-lazy-highlight-start
2408                                          (window-end)))
2409                                  (setq found nil)
2410                                (forward-char 1))
2411                            (if (= mb (if isearch-lazy-highlight-wrapped
2412                                          isearch-lazy-highlight-end
2413                                        (window-start)))
2414                                (setq found nil)
2415                              (forward-char -1)))
2416    
2417                      ;; non-zero-length match                      ;; non-zero-length match
2418                      (let ((ov (make-overlay mb me)))                      (let ((ov (make-overlay mb me)))
# Line 2411  Attempt to do the search exactly the way Line 2422  Attempt to do the search exactly the way
2422                        (push ov isearch-lazy-highlight-overlays)))                        (push ov isearch-lazy-highlight-overlays)))
2423                    (if isearch-forward                    (if isearch-forward
2424                        (setq isearch-lazy-highlight-end (point))                        (setq isearch-lazy-highlight-end (point))
2425                      (setq isearch-lazy-highlight-start (point))))                      (setq isearch-lazy-highlight-start (point)))))
2426    
2427                ;; not found              ;; not found or zero-length match at the search bound
2428                (if isearch-lazy-highlight-wrapped              (if (not found)
2429                    (setq looping nil                  (if isearch-lazy-highlight-wrapped
2430                          nomore  t)                      (setq looping nil
2431                  (setq isearch-lazy-highlight-wrapped t)                            nomore  t)
2432                  (if isearch-forward                    (setq isearch-lazy-highlight-wrapped t)
2433                      (progn                    (if isearch-forward
2434                        (setq isearch-lazy-highlight-end (window-start))                        (progn
2435                        (goto-char (window-start)))                          (setq isearch-lazy-highlight-end (window-start))
2436                    (setq isearch-lazy-highlight-start (window-end))                          (goto-char (window-start)))
2437                    (goto-char (window-end)))))))                      (setq isearch-lazy-highlight-start (window-end))
2438                        (goto-char (window-end)))))))
2439          (unless nomore          (unless nomore
2440            (setq isearch-lazy-highlight-timer            (setq isearch-lazy-highlight-timer
2441                  (run-at-time isearch-lazy-highlight-interval nil                  (run-at-time isearch-lazy-highlight-interval nil

Legend:
Removed from v.1.212.2.12  
changed lines
  Added in v.1.212.2.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26