[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] isearch-mb 0524206 3/7: Replace advices by let-bindings where pos
From: |
Stefan Monnier |
Subject: |
[elpa] isearch-mb 0524206 3/7: Replace advices by let-bindings where possible |
Date: |
Mon, 17 May 2021 12:18:40 -0400 (EDT) |
branch: isearch-mb
commit 05242069aa6e0a41ff40e1a1a605f969ebba5217
Author: Augusto Stoffel <arstoffel@gmail.com>
Commit: Augusto Stoffel <arstoffel@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)))))
- [elpa] branch isearch-mb created (now 781b537), Stefan Monnier, 2021/05/17
- [elpa] isearch-mb ebb9f55 1/7: Keep advices only for the duration of a search session, Stefan Monnier, 2021/05/17
- [elpa] isearch-mb fd9bdeb 6/7: Pad lazy count so that it only grows, Stefan Monnier, 2021/05/17
- [elpa] isearch-mb 44b9aa3 4/7: Use remapping in minibuffer keymap, Stefan Monnier, 2021/05/17
- [elpa] isearch-mb 0524206 3/7: Replace advices by let-bindings where possible,
Stefan Monnier <=
- [elpa] isearch-mb a2ec550 2/7: Better place to check if Isearch is still active, Stefan Monnier, 2021/05/17
- [elpa] isearch-mb ffd65df 5/7: Update Readme, Stefan Monnier, 2021/05/17
- [elpa] isearch-mb 781b537 7/7: Prepare for inclusion in GNU ELPA, Stefan Monnier, 2021/05/17