branch: externals/ivy-posframe
commit 17948666ddcadcb9cba36c5e4492f46784d4a6b5
Author: conao3 <[email protected]>
Commit: conao3 <[email protected]>

    not use let variable to make code simple
---
 ivy-posframe.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 946cc05..47249b7 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -553,14 +553,13 @@ The return value is undefined.
             ([remap swiper-avy]           . ivy-posframe-swiper-avy)
             ([remap ivy-read-action]      . ivy-posframe-read-action)
             ([remap ivy-dispatching-done] . ivy-posframe-dispatching-done))
-  (let ((advices ivy-posframe-advice-alist))
-    (if ivy-posframe-mode
-        (mapc (lambda (elm)
-                  (advice-add (car elm) :around (cdr elm)))
-                advices)
+  (if ivy-posframe-mode
       (mapc (lambda (elm)
-                (advice-remove (car elm) (cdr elm)))
-              advices))))
+              (advice-add (car elm) :around (cdr elm)))
+            ivy-posframe-advice-alist)
+    (mapc (lambda (elm)
+            (advice-remove (car elm) (cdr elm)))
+          ivy-posframe-advice-alist)))
 
 ;;;###autoload
 (defun ivy-posframe-enable ()

Reply via email to