diff options
| author | Augusto Stoffel | 2022-05-15 22:48:50 +0200 |
|---|---|---|
| committer | Juri Linkov | 2022-05-18 21:55:34 +0300 |
| commit | e55b4074af27ff0840a90baea6fc9aecd28fbbc8 (patch) | |
| tree | 74446f9f636e34ea90490e4e064bd14b012f615e | |
| parent | b1620a44ff201966c9900a116a640597093e6030 (diff) | |
| download | emacs-e55b4074af27ff0840a90baea6fc9aecd28fbbc8.tar.gz emacs-e55b4074af27ff0840a90baea6fc9aecd28fbbc8.zip | |
Fix last change in minibuffer-lazy-highlight-setup
* lisp/isearch.el (minibuffer-lazy-highlight-setup): Apply advices
buffer-locally.
| -rw-r--r-- | lisp/isearch.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index 3e1dab4d15d..31fbdf01bf2 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -4410,14 +4410,17 @@ LAX-WHITESPACE: The value of `isearch-lax-whitespace' and | |||
| 4410 | (let ((unwind (make-symbol "minibuffer-lazy-highlight--unwind")) | 4410 | (let ((unwind (make-symbol "minibuffer-lazy-highlight--unwind")) |
| 4411 | (after-change (make-symbol "minibuffer-lazy-highlight--after-change")) | 4411 | (after-change (make-symbol "minibuffer-lazy-highlight--after-change")) |
| 4412 | (display-count (make-symbol "minibuffer-lazy-highlight--display-count")) | 4412 | (display-count (make-symbol "minibuffer-lazy-highlight--display-count")) |
| 4413 | (buffer (current-buffer)) | ||
| 4413 | overlay) | 4414 | overlay) |
| 4414 | (fset unwind | 4415 | (fset unwind |
| 4415 | (lambda () | 4416 | (lambda () |
| 4416 | (remove-function isearch-filter-predicate filter) | 4417 | (when filter |
| 4418 | (with-current-buffer buffer | ||
| 4419 | (remove-function (local 'isearch-filter-predicate) filter))) | ||
| 4417 | (remove-hook 'lazy-count-update-hook display-count) | 4420 | (remove-hook 'lazy-count-update-hook display-count) |
| 4418 | (when overlay (delete-overlay overlay)) | 4421 | (when overlay (delete-overlay overlay)) |
| 4419 | (remove-hook 'after-change-functions after-change) | 4422 | (remove-hook 'after-change-functions after-change t) |
| 4420 | (remove-hook 'minibuffer-exit-hook unwind) | 4423 | (remove-hook 'minibuffer-exit-hook unwind t) |
| 4421 | (let ((lazy-highlight-cleanup cleanup)) | 4424 | (let ((lazy-highlight-cleanup cleanup)) |
| 4422 | (lazy-highlight-cleanup)))) | 4425 | (lazy-highlight-cleanup)))) |
| 4423 | (fset after-change | 4426 | (fset after-change |
| @@ -4447,8 +4450,8 @@ LAX-WHITESPACE: The value of `isearch-lax-whitespace' and | |||
| 4447 | (setq overlay (make-overlay (point-min) (point-min) (current-buffer) t)) | 4450 | (setq overlay (make-overlay (point-min) (point-min) (current-buffer) t)) |
| 4448 | (add-hook 'lazy-count-update-hook display-count)) | 4451 | (add-hook 'lazy-count-update-hook display-count)) |
| 4449 | (when filter | 4452 | (when filter |
| 4450 | (make-local-variable 'isearch-filter-predicate) | 4453 | (with-current-buffer buffer |
| 4451 | (add-function :after-while isearch-filter-predicate filter)) | 4454 | (add-function :after-while (local 'isearch-filter-predicate) filter))) |
| 4452 | (funcall after-change nil nil nil))))) | 4455 | (funcall after-change nil nil nil))))) |
| 4453 | 4456 | ||
| 4454 | 4457 | ||