[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-posframe 36cae42 102/195: use ivy-posframe-advice-a

From: Feng Shu
Subject: [elpa] externals/ivy-posframe 36cae42 102/195: use ivy-posframe-advice-alist to apply advice
Date: Sat, 3 Oct 2020 07:11:54 -0400 (EDT)

branch: externals/ivy-posframe
commit 36cae424309e5049311d9a30911615e575b744b8
Author: conao3 <conao3@gmail.com>
Commit: conao3 <conao3@gmail.com>

    use ivy-posframe-advice-alist to apply advice
 ivy-posframe.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 465c66d..a9e0706 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -451,15 +451,16 @@ selection, non-nil otherwise."
       (mapcar (lambda (fn)
                 `(push `(,fn :cleanup ivy-posframe-cleanup) 
-              ivy-posframe-display-functions)))
+              ivy-posframe-display-functions)
+      (mapcar (lambda (elm)
+                `(advice-add ',(car elm) :around #',(cdr elm)))
+              ivy-posframe-advice-alist)))
   (define-key ivy-minibuffer-map
     [remap ivy-read-action] 'ivy-posframe-read-action)
   (define-key ivy-minibuffer-map
     [remap ivy-dispatching-done] 'ivy-posframe-dispatching-done)
   (define-key ivy-minibuffer-map [remap ivy-avy] 'ivy-posframe-avy)
   (define-key ivy-minibuffer-map [remap swiper-avy] 'ivy-posframe-swiper-avy)
-  (advice-add 'ivy--minibuffer-setup :around #'ivy-posframe--minibuffer-setup)
-  (advice-add 'ivy--queue-exhibit :around #'ivy-posframe--add-prompt)
   (message "ivy-posframe is enabled, disabling it need to reboot emacs."))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]