diff options
| author | Juri Linkov | 2017-02-22 02:10:36 +0200 |
|---|---|---|
| committer | Juri Linkov | 2017-02-22 02:10:36 +0200 |
| commit | c5e66afa88d6ff8ad5c42318d85188ed477e7db2 (patch) | |
| tree | 86be5835f6ff85d91243eb8a29d6c2bf39438688 | |
| parent | 17af43ca76692c7e889c91d3fa9e6690349f0d57 (diff) | |
| download | emacs-c5e66afa88d6ff8ad5c42318d85188ed477e7db2.tar.gz emacs-c5e66afa88d6ff8ad5c42318d85188ed477e7db2.zip | |
* lisp/isearch.el (isearch-lazy-highlight): New choice ‘all-windows’.
(isearch-lazy-highlight-update): Check it to decide whether to apply
overlays only on the selected window.
* lisp/follow.el (follow-mode): Set isearch-lazy-highlight to ‘all-windows’.
(Bug#17453, bug#21092)
| -rw-r--r-- | lisp/follow.el | 3 | ||||
| -rw-r--r-- | lisp/isearch.el | 14 |
2 files changed, 13 insertions, 4 deletions
diff --git a/lisp/follow.el b/lisp/follow.el index 3ad4f108902..db3b2821a56 100644 --- a/lisp/follow.el +++ b/lisp/follow.el | |||
| @@ -427,6 +427,9 @@ Keys specific to Follow mode: | |||
| 427 | (add-hook 'replace-update-post-hook 'follow-post-command-hook nil t) | 427 | (add-hook 'replace-update-post-hook 'follow-post-command-hook nil t) |
| 428 | (add-hook 'ispell-update-post-hook 'follow-post-command-hook nil t) | 428 | (add-hook 'ispell-update-post-hook 'follow-post-command-hook nil t) |
| 429 | 429 | ||
| 430 | (when isearch-lazy-highlight | ||
| 431 | (setq-local isearch-lazy-highlight 'all-windows)) | ||
| 432 | |||
| 430 | (setq window-group-start-function 'follow-window-start) | 433 | (setq window-group-start-function 'follow-window-start) |
| 431 | (setq window-group-end-function 'follow-window-end) | 434 | (setq window-group-end-function 'follow-window-end) |
| 432 | (setq set-window-group-start-function 'follow-set-window-start) | 435 | (setq set-window-group-start-function 'follow-set-window-start) |
diff --git a/lisp/isearch.el b/lisp/isearch.el index d0fb15ec641..699d6eaf730 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -285,8 +285,13 @@ are `word-search-regexp' \(`\\[isearch-toggle-word]'), `isearch-symbol-regexp' | |||
| 285 | "Controls the lazy-highlighting during incremental search. | 285 | "Controls the lazy-highlighting during incremental search. |
| 286 | When non-nil, all text in the buffer matching the current search | 286 | When non-nil, all text in the buffer matching the current search |
| 287 | string is highlighted lazily (see `lazy-highlight-initial-delay' | 287 | string is highlighted lazily (see `lazy-highlight-initial-delay' |
| 288 | and `lazy-highlight-interval')." | 288 | and `lazy-highlight-interval'). |
| 289 | :type 'boolean | 289 | |
| 290 | When multiple windows display the current buffer, the | ||
| 291 | highlighting is displayed only on the selected window, unless | ||
| 292 | this variable is set to the symbol `all-windows'." | ||
| 293 | :type '(choice boolean | ||
| 294 | (const :tag "On, and applied to all windows" all-windows)) | ||
| 290 | :group 'lazy-highlight | 295 | :group 'lazy-highlight |
| 291 | :group 'isearch) | 296 | :group 'isearch) |
| 292 | 297 | ||
| @@ -3298,8 +3303,9 @@ Attempt to do the search exactly the way the pending Isearch would." | |||
| 3298 | ;; 1000 is higher than ediff's 100+, | 3303 | ;; 1000 is higher than ediff's 100+, |
| 3299 | ;; but lower than isearch main overlay's 1001 | 3304 | ;; but lower than isearch main overlay's 1001 |
| 3300 | (overlay-put ov 'priority 1000) | 3305 | (overlay-put ov 'priority 1000) |
| 3301 | (overlay-put ov 'face 'lazy-highlight))) | 3306 | (overlay-put ov 'face 'lazy-highlight) |
| 3302 | ;(overlay-put ov 'window (selected-window)))) | 3307 | (unless (eq isearch-lazy-highlight 'all-windows) |
| 3308 | (overlay-put ov 'window (selected-window))))) | ||
| 3303 | ;; Remember the current position of point for | 3309 | ;; Remember the current position of point for |
| 3304 | ;; the next call of `isearch-lazy-highlight-update' | 3310 | ;; the next call of `isearch-lazy-highlight-update' |
| 3305 | ;; when `lazy-highlight-max-at-a-time' is too small. | 3311 | ;; when `lazy-highlight-max-at-a-time' is too small. |