diff options
| author | Juri Linkov | 2018-11-05 23:11:30 +0200 |
|---|---|---|
| committer | Juri Linkov | 2018-11-05 23:11:30 +0200 |
| commit | ff1ee4e0bef4f62b758b70266d2f21be166924c3 (patch) | |
| tree | 6aeeca0868577db470ec371ed774b39ce2585888 | |
| parent | 0e1d946a9386ff4fbd5f72f39cc96cbdb07f525d (diff) | |
| download | emacs-ff1ee4e0bef4f62b758b70266d2f21be166924c3.tar.gz emacs-ff1ee4e0bef4f62b758b70266d2f21be166924c3.zip | |
Support lazy-highlight-buffer in Info (bug#29321, bug#29360).
* lisp/isearch.el (isearch-lazy-highlight-point-min)
(isearch-lazy-highlight-point-max): New variables.
(isearch-lazy-highlight-new-loop): When lazy-highlight-buffer is
non-nil, compare (point-min) with isearch-lazy-highlight-point-min,
and (point-max) with isearch-lazy-highlight-point-max, for buffers
like Info where narrowing changes the values point-min and point-max.
| -rw-r--r-- | lisp/isearch.el | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index 580b3ac40a6..42b3aa42ba9 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -3202,6 +3202,8 @@ since they have special meaning in a regexp." | |||
| 3202 | (defvar isearch-lazy-highlight-window-group nil) | 3202 | (defvar isearch-lazy-highlight-window-group nil) |
| 3203 | (defvar isearch-lazy-highlight-window-start nil) | 3203 | (defvar isearch-lazy-highlight-window-start nil) |
| 3204 | (defvar isearch-lazy-highlight-window-end nil) | 3204 | (defvar isearch-lazy-highlight-window-end nil) |
| 3205 | (defvar isearch-lazy-highlight-point-min nil) | ||
| 3206 | (defvar isearch-lazy-highlight-point-max nil) | ||
| 3205 | (defvar isearch-lazy-highlight-buffer nil) | 3207 | (defvar isearch-lazy-highlight-buffer nil) |
| 3206 | (defvar isearch-lazy-highlight-case-fold-search nil) | 3208 | (defvar isearch-lazy-highlight-case-fold-search nil) |
| 3207 | (defvar isearch-lazy-highlight-regexp nil) | 3209 | (defvar isearch-lazy-highlight-regexp nil) |
| @@ -3251,17 +3253,21 @@ by other Emacs features." | |||
| 3251 | isearch-lax-whitespace)) | 3253 | isearch-lax-whitespace)) |
| 3252 | (not (eq isearch-lazy-highlight-regexp-lax-whitespace | 3254 | (not (eq isearch-lazy-highlight-regexp-lax-whitespace |
| 3253 | isearch-regexp-lax-whitespace)) | 3255 | isearch-regexp-lax-whitespace)) |
| 3254 | (not (or lazy-highlight-buffer | ||
| 3255 | (= (window-group-start) | ||
| 3256 | isearch-lazy-highlight-window-start))) | ||
| 3257 | (not (or lazy-highlight-buffer | ||
| 3258 | (= (window-group-end) ; Window may have been split/joined. | ||
| 3259 | isearch-lazy-highlight-window-end))) | ||
| 3260 | (not (eq isearch-forward | 3256 | (not (eq isearch-forward |
| 3261 | isearch-lazy-highlight-forward)) | 3257 | isearch-lazy-highlight-forward)) |
| 3262 | ;; In case we are recovering from an error. | 3258 | ;; In case we are recovering from an error. |
| 3263 | (not (equal isearch-error | 3259 | (not (equal isearch-error |
| 3264 | isearch-lazy-highlight-error)))) | 3260 | isearch-lazy-highlight-error)) |
| 3261 | (not (if lazy-highlight-buffer | ||
| 3262 | (= (point-min) | ||
| 3263 | isearch-lazy-highlight-point-min) | ||
| 3264 | (= (window-group-start) | ||
| 3265 | isearch-lazy-highlight-window-start))) | ||
| 3266 | (not (if lazy-highlight-buffer | ||
| 3267 | (= (point-max) | ||
| 3268 | isearch-lazy-highlight-point-max) | ||
| 3269 | (= (window-group-end) ; Window may have been split/joined. | ||
| 3270 | isearch-lazy-highlight-window-end))))) | ||
| 3265 | ;; something important did indeed change | 3271 | ;; something important did indeed change |
| 3266 | (lazy-highlight-cleanup t (not (equal isearch-string ""))) ;stop old timer | 3272 | (lazy-highlight-cleanup t (not (equal isearch-string ""))) ;stop old timer |
| 3267 | (setq isearch-lazy-highlight-error isearch-error) | 3273 | (setq isearch-lazy-highlight-error isearch-error) |
| @@ -3274,6 +3280,8 @@ by other Emacs features." | |||
| 3274 | isearch-lazy-highlight-window-group (selected-window-group) | 3280 | isearch-lazy-highlight-window-group (selected-window-group) |
| 3275 | isearch-lazy-highlight-window-start (window-group-start) | 3281 | isearch-lazy-highlight-window-start (window-group-start) |
| 3276 | isearch-lazy-highlight-window-end (window-group-end) | 3282 | isearch-lazy-highlight-window-end (window-group-end) |
| 3283 | isearch-lazy-highlight-point-min (point-min) | ||
| 3284 | isearch-lazy-highlight-point-max (point-max) | ||
| 3277 | isearch-lazy-highlight-buffer lazy-highlight-buffer | 3285 | isearch-lazy-highlight-buffer lazy-highlight-buffer |
| 3278 | ;; Start lazy-highlighting at the beginning of the found | 3286 | ;; Start lazy-highlighting at the beginning of the found |
| 3279 | ;; match (`isearch-other-end'). If no match, use point. | 3287 | ;; match (`isearch-other-end'). If no match, use point. |