943 |
(isearch-message-prefix nil nil isearch-nonincremental) |
(isearch-message-prefix nil nil isearch-nonincremental) |
944 |
isearch-string |
isearch-string |
945 |
minibuffer-local-isearch-map nil |
minibuffer-local-isearch-map nil |
946 |
'junk-ring)) |
'junk-ring nil t)) |
947 |
isearch-new-message |
isearch-new-message |
948 |
(mapconcat 'isearch-text-char-description |
(mapconcat 'isearch-text-char-description |
949 |
isearch-new-string ""))) |
isearch-new-string ""))) |
2386 |
(let ((max isearch-lazy-highlight-max-at-a-time) |
(let ((max isearch-lazy-highlight-max-at-a-time) |
2387 |
(looping t) |
(looping t) |
2388 |
nomore) |
nomore) |
2389 |
(save-excursion |
(with-local-quit |
2390 |
(save-match-data |
(save-selected-window |
2391 |
(goto-char (if isearch-forward |
(if (and (window-live-p isearch-lazy-highlight-window) |
2392 |
isearch-lazy-highlight-end |
(not (eq (selected-window) isearch-lazy-highlight-window))) |
2393 |
isearch-lazy-highlight-start)) |
(select-window isearch-lazy-highlight-window)) |
2394 |
(while looping |
(save-excursion |
2395 |
(let ((found (isearch-lazy-highlight-search))) |
(save-match-data |
2396 |
(when max |
(goto-char (if isearch-forward |
2397 |
(setq max (1- max)) |
isearch-lazy-highlight-end |
2398 |
(if (<= max 0) |
isearch-lazy-highlight-start)) |
2399 |
(setq looping nil))) |
(while looping |
2400 |
(if found |
(let ((found (isearch-lazy-highlight-search))) |
2401 |
(let ((mb (match-beginning 0)) |
(when max |
2402 |
(me (match-end 0))) |
(setq max (1- max)) |
2403 |
(if (= mb me) ;zero-length match |
(if (<= max 0) |
2404 |
|
(setq looping nil))) |
2405 |
|
(if found |
2406 |
|
(let ((mb (match-beginning 0)) |
2407 |
|
(me (match-end 0))) |
2408 |
|
(if (= mb me) ;zero-length match |
2409 |
|
(if isearch-forward |
2410 |
|
(if (= mb (if isearch-lazy-highlight-wrapped |
2411 |
|
isearch-lazy-highlight-start |
2412 |
|
(window-end))) |
2413 |
|
(setq found nil) |
2414 |
|
(forward-char 1)) |
2415 |
|
(if (= mb (if isearch-lazy-highlight-wrapped |
2416 |
|
isearch-lazy-highlight-end |
2417 |
|
(window-start))) |
2418 |
|
(setq found nil) |
2419 |
|
(forward-char -1))) |
2420 |
|
|
2421 |
|
;; non-zero-length match |
2422 |
|
(let ((ov (make-overlay mb me))) |
2423 |
|
(push ov isearch-lazy-highlight-overlays) |
2424 |
|
(overlay-put ov 'face isearch-lazy-highlight-face) |
2425 |
|
(overlay-put ov 'priority 0) ;lower than main overlay |
2426 |
|
(overlay-put ov 'window (selected-window)))) |
2427 |
|
(if isearch-forward |
2428 |
|
(setq isearch-lazy-highlight-end (point)) |
2429 |
|
(setq isearch-lazy-highlight-start (point))))) |
2430 |
|
|
2431 |
|
;; not found or zero-length match at the search bound |
2432 |
|
(if (not found) |
2433 |
|
(if isearch-lazy-highlight-wrapped |
2434 |
|
(setq looping nil |
2435 |
|
nomore t) |
2436 |
|
(setq isearch-lazy-highlight-wrapped t) |
2437 |
(if isearch-forward |
(if isearch-forward |
2438 |
(if (= mb (if isearch-lazy-highlight-wrapped |
(progn |
2439 |
isearch-lazy-highlight-start |
(setq isearch-lazy-highlight-end (window-start)) |
2440 |
(window-end))) |
(goto-char (window-start))) |
2441 |
(setq found nil) |
(setq isearch-lazy-highlight-start (window-end)) |
2442 |
(forward-char 1)) |
(goto-char (window-end))))))) |
2443 |
(if (= mb (if isearch-lazy-highlight-wrapped |
(unless nomore |
2444 |
isearch-lazy-highlight-end |
(setq isearch-lazy-highlight-timer |
2445 |
(window-start))) |
(run-at-time isearch-lazy-highlight-interval nil |
2446 |
(setq found nil) |
'isearch-lazy-highlight-update))))))))) |
|
(forward-char -1))) |
|
|
|
|
|
;; non-zero-length match |
|
|
(let ((ov (make-overlay mb me))) |
|
|
(overlay-put ov 'face isearch-lazy-highlight-face) |
|
|
(overlay-put ov 'priority 0) ;lower than main overlay |
|
|
(overlay-put ov 'window (selected-window)) |
|
|
(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 |
|
|
'isearch-lazy-highlight-update))))))) |
|
2447 |
|
|
2448 |
(defun isearch-resume (search regexp word forward message case-fold) |
(defun isearch-resume (search regexp word forward message case-fold) |
2449 |
"Resume an incremental search. |
"Resume an incremental search. |