branch: isearch-mb commit 05242069aa6e0a41ff40e1a1a605f969ebba5217 Author: Augusto Stoffel <arstof...@gmail.com> Commit: Augusto Stoffel <arstof...@gmail.com>
Replace advices by let-bindings where possible --- isearch-mb.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/isearch-mb.el b/isearch-mb.el index 1dcb3d4..6d5e441 100644 --- a/isearch-mb.el +++ b/isearch-mb.el @@ -174,6 +174,8 @@ minibuffer." (apply (catch 'isearch-mb--continue (cl-letf (((cdr isearch-mode-map) nil) + ((symbol-function #'isearch-pre-command-hook) #'ignore) + ((symbol-function #'isearch--momentary-message) #'isearch-mb--momentary-message) ;; We need to set `inhibit-redisplay' at certain points to ;; avoid flicker. As a side effect, window-start/end in ;; `isearch-lazy-highlight-update' will have incorrect values, @@ -194,8 +196,6 @@ minibuffer." (advice-add fun :around #'isearch-mb--with-buffer)) (dolist (fun isearch-mb--after-exit) (advice-add fun :around #'isearch-mb--after-exit)) - (advice-add #'isearch--momentary-message :override #'isearch-mb--momentary-message) - (advice-add #'isearch-pre-command-hook :override #'ignore) (read-from-minibuffer "I-search: " nil @@ -211,9 +211,7 @@ minibuffer." (dolist (fun isearch-mb--after-exit) (advice-remove fun #'isearch-mb--after-exit)) (dolist (fun isearch-mb--with-buffer) - (advice-remove fun #'isearch-mb--with-buffer)) - (advice-remove #'isearch--momentary-message #'isearch-mb--momentary-message) - (advice-remove #'isearch-pre-command-hook #'ignore))) + (advice-remove fun #'isearch-mb--with-buffer)))) (if isearch-mode '(isearch-done) '(ignore))))) (quit (if isearch-mode (isearch-cancel) (signal 'quit nil)))))