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

    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."
    `(progn
       (mapcar (lambda (fn)
                 `(push `(,fn :cleanup ivy-posframe-cleanup) 
ivy-display-functions-props))
-              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."))
 
 ;;;###autoload

Reply via email to