emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/ivy-posframe 83657be 114/195: add display-functions-ali


From: Feng Shu
Subject: [elpa] externals/ivy-posframe 83657be 114/195: add display-functions-alist to restore ivy variable
Date: Sat, 3 Oct 2020 07:11:56 -0400 (EDT)

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

    add display-functions-alist to restore ivy variable
---
 ivy-posframe.el | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 367c74a..409a1e0 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -121,6 +121,11 @@
   :group 'ivy
   :prefix "ivy-posframe")
 
+(defcustom ivy-posframe-display-functions-alist '((t . ivy-posframe-display))
+  "The ivy function, display function alist."
+  :group 'ivy-posframe
+  :type 'sexp)
+
 (defcustom ivy-posframe-style 'window-bottom-left
   "The style of ivy-posframe."
   :group 'ivy-posframe
@@ -460,15 +465,18 @@ selection, non-nil otherwise."
   :group 'ivy-posframe
   (let ((fncs ivy-posframe-display-function-list)
         (advs ivy-posframe-advice-alist)
-        (keys ivy-posframe-keybind-list))
+        (keys ivy-posframe-keybind-list)
+        (dfns ivy-posframe-display-functions-alist))
     (if ivy-posframe-mode
         (eval
          `(progn
+            ,@(mapcar (lambda (elm) `(push ',elm ivy-display-functions-alist)) 
dfns)
             ,@(mapcar (lambda (elm) `(push '(,elm :cleanup 
ivy-posframe-cleanup) ivy-display-functions-props)) fncs)
             ,@(mapcar (lambda (elm) `(advice-add ',(car elm) :around #',(cdr 
elm))) advs)
             ,@(mapcar (lambda (elm) `(define-key ,(nth 0 elm) ,(nth 1 elm) 
',(nth 2 elm))) keys)))
       (eval
        `(progn
+          ,@(mapcar (lambda (elm) `(setq ivy-display-functions-alist (delete 
',elm ivy-display-functions-alist))) dfns)
           ,@(mapcar (lambda (elm) `(push '(,elm :cleanup ignore) 
ivy-display-functions-props)) fncs)
           ,@(mapcar (lambda (elm) `(advice-remove ',(car elm) #',(cdr elm))) 
advs)
           ,@(mapcar (lambda (elm) `(define-key ,(nth 0 elm) ,(nth 1 elm) nil)) 
keys))))))



reply via email to

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