diff options
| author | Juri Linkov | 2010-12-20 01:18:15 +0000 |
|---|---|---|
| committer | Juri Linkov | 2010-12-20 01:18:15 +0000 |
| commit | 957e5dd1e98253145a6d8bf5dd392c74ac4b8409 (patch) | |
| tree | 5cc26d4fcf8f142671b4bdd489d93a982ff3cd54 | |
| parent | d3658de7373f55d5f153748aafe82e5806672085 (diff) | |
| download | emacs-957e5dd1e98253145a6d8bf5dd392c74ac4b8409.tar.gz emacs-957e5dd1e98253145a6d8bf5dd392c74ac4b8409.zip | |
* lisp/isearch.el (isearch-lazy-highlight-error): New variable.
(isearch-lazy-highlight-new-loop): Compare `isearch-error' and
`isearch-lazy-highlight-error'. Set `isearch-lazy-highlight-error'
to the current value of `isearch-error' (Bug#7468).
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/isearch.el | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6002c388e90..25cc72d0b7f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2010-12-20 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * isearch.el (isearch-lazy-highlight-error): New variable. | ||
| 4 | (isearch-lazy-highlight-new-loop): Compare `isearch-error' and | ||
| 5 | `isearch-lazy-highlight-error'. Set `isearch-lazy-highlight-error' | ||
| 6 | to the current value of `isearch-error' (Bug#7468). | ||
| 7 | |||
| 1 | 2010-12-17 Chong Yidong <cyd@stupidchicken.com> | 8 | 2010-12-17 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 9 | ||
| 3 | * help-fns.el (describe-variable): Don't emit trailing whitespace | 10 | * help-fns.el (describe-variable): Don't emit trailing whitespace |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 3b04fa270b0..afc18cae127 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -2579,6 +2579,7 @@ since they have special meaning in a regexp." | |||
| 2579 | (defvar isearch-lazy-highlight-regexp nil) | 2579 | (defvar isearch-lazy-highlight-regexp nil) |
| 2580 | (defvar isearch-lazy-highlight-space-regexp nil) | 2580 | (defvar isearch-lazy-highlight-space-regexp nil) |
| 2581 | (defvar isearch-lazy-highlight-forward nil) | 2581 | (defvar isearch-lazy-highlight-forward nil) |
| 2582 | (defvar isearch-lazy-highlight-error nil) | ||
| 2582 | 2583 | ||
| 2583 | (defun lazy-highlight-cleanup (&optional force) | 2584 | (defun lazy-highlight-cleanup (&optional force) |
| 2584 | "Stop lazy highlighting and remove extra highlighting from current buffer. | 2585 | "Stop lazy highlighting and remove extra highlighting from current buffer. |
| @@ -2620,9 +2621,13 @@ by other Emacs features." | |||
| 2620 | (not (= (window-end) ; Window may have been split/joined. | 2621 | (not (= (window-end) ; Window may have been split/joined. |
| 2621 | isearch-lazy-highlight-window-end)) | 2622 | isearch-lazy-highlight-window-end)) |
| 2622 | (not (eq isearch-forward | 2623 | (not (eq isearch-forward |
| 2623 | isearch-lazy-highlight-forward)))) | 2624 | isearch-lazy-highlight-forward)) |
| 2625 | ;; In case we are recovering from an error. | ||
| 2626 | (not (equal isearch-error | ||
| 2627 | isearch-lazy-highlight-error)))) | ||
| 2624 | ;; something important did indeed change | 2628 | ;; something important did indeed change |
| 2625 | (lazy-highlight-cleanup t) ;kill old loop & remove overlays | 2629 | (lazy-highlight-cleanup t) ;kill old loop & remove overlays |
| 2630 | (setq isearch-lazy-highlight-error isearch-error) | ||
| 2626 | (when (not isearch-error) | 2631 | (when (not isearch-error) |
| 2627 | (setq isearch-lazy-highlight-start-limit beg | 2632 | (setq isearch-lazy-highlight-start-limit beg |
| 2628 | isearch-lazy-highlight-end-limit end) | 2633 | isearch-lazy-highlight-end-limit end) |