/[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.221.2.6 by miles, Sat Sep 4 09:14:25 2004 UTC revision 1.221.2.7 by miles, Thu Sep 9 09:36:31 2004 UTC
# Line 2358  search string to change or the window to Line 2358  search string to change or the window to
2358              isearch-lazy-highlight-case-fold-search isearch-case-fold-search              isearch-lazy-highlight-case-fold-search isearch-case-fold-search
2359              isearch-lazy-highlight-regexp       isearch-regexp              isearch-lazy-highlight-regexp       isearch-regexp
2360              isearch-lazy-highlight-wrapped      nil)              isearch-lazy-highlight-wrapped      nil)
2361        (setq isearch-lazy-highlight-timer        (unless (equal isearch-string "")
2362              (run-with-idle-timer isearch-lazy-highlight-initial-delay nil          (setq isearch-lazy-highlight-timer
2363                                   'isearch-lazy-highlight-update)))))                (run-with-idle-timer isearch-lazy-highlight-initial-delay nil
2364                                       'isearch-lazy-highlight-update))))))
2365    
2366  (defun isearch-lazy-highlight-search ()  (defun isearch-lazy-highlight-search ()
2367    "Search ahead for the next or previous match, for lazy highlighting.    "Search ahead for the next or previous match, for lazy highlighting.
# Line 2397  Attempt to do the search exactly the way Line 2398  Attempt to do the search exactly the way
2398                  (let ((mb (match-beginning 0))                  (let ((mb (match-beginning 0))
2399                        (me (match-end 0)))                        (me (match-end 0)))
2400                    (if (= mb me)      ;zero-length match                    (if (= mb me)      ;zero-length match
2401                        (forward-char 1)                        (if isearch-forward
2402                              (if (= mb (if isearch-lazy-highlight-wrapped
2403                                            isearch-lazy-highlight-start
2404                                          (window-end)))
2405                                  (setq found nil)
2406                                (forward-char 1))
2407                            (if (= mb (if isearch-lazy-highlight-wrapped
2408                                          isearch-lazy-highlight-end
2409                                        (window-start)))
2410                                (setq found nil)
2411                              (forward-char -1)))
2412    
2413                      ;; non-zero-length match                      ;; non-zero-length match
2414                      (let ((ov (make-overlay mb me)))                      (let ((ov (make-overlay mb me)))
# Line 2407  Attempt to do the search exactly the way Line 2418  Attempt to do the search exactly the way
2418                        (push ov isearch-lazy-highlight-overlays)))                        (push ov isearch-lazy-highlight-overlays)))
2419                    (if isearch-forward                    (if isearch-forward
2420                        (setq isearch-lazy-highlight-end (point))                        (setq isearch-lazy-highlight-end (point))
2421                      (setq isearch-lazy-highlight-start (point))))                      (setq isearch-lazy-highlight-start (point)))))
2422    
2423                ;; not found              ;; not found or zero-length match at the search bound
2424                (if isearch-lazy-highlight-wrapped              (if (not found)
2425                    (setq looping nil                  (if isearch-lazy-highlight-wrapped
2426                          nomore  t)                      (setq looping nil
2427                  (setq isearch-lazy-highlight-wrapped t)                            nomore  t)
2428                  (if isearch-forward                    (setq isearch-lazy-highlight-wrapped t)
2429                      (progn                    (if isearch-forward
2430                        (setq isearch-lazy-highlight-end (window-start))                        (progn
2431                        (goto-char (window-start)))                          (setq isearch-lazy-highlight-end (window-start))
2432                    (setq isearch-lazy-highlight-start (window-end))                          (goto-char (window-start)))
2433                    (goto-char (window-end)))))))                      (setq isearch-lazy-highlight-start (window-end))
2434                        (goto-char (window-end)))))))
2435          (unless nomore          (unless nomore
2436            (setq isearch-lazy-highlight-timer            (setq isearch-lazy-highlight-timer
2437                  (run-at-time isearch-lazy-highlight-interval nil                  (run-at-time isearch-lazy-highlight-interval nil

Legend:
Removed from v.1.221.2.6  
changed lines
  Added in v.1.221.2.7

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