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

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

[elpa] externals/ivy-posframe c9a7331 143/195: handle ivy-display-functi


From: Feng Shu
Subject: [elpa] externals/ivy-posframe c9a7331 143/195: handle ivy-display-function
Date: Sat, 3 Oct 2020 07:12:02 -0400 (EDT)

branch: externals/ivy-posframe
commit c9a7331ee44e32d5f1fc3c392ec138f41961532e
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>

    handle ivy-display-function
---
 ivy-posframe.el | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index ef86418..e2897a3 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -518,13 +518,15 @@ selection, non-nil otherwise."
             ([remap ivy-avy] ivy-posframe-avy)
             ([remap swiper-avy] ivy-posframe-swiper-avy))
   (let ((advices ivy-posframe-advice-alist))
-    (if ivy-posframe-mode
+    (if ivy-display-function
+        (message "ivy-posframe: `ivy-display-function' is used, so 
ivy-posframe-mode can not enable.")
+      (if ivy-posframe-mode
+          (mapcar (lambda (elm)
+                    (advice-add (car elm) :around (cdr elm)))
+                  advices)
         (mapcar (lambda (elm)
-                  (advice-add (car elm) :around (cdr elm)))
-                advices)
-      (mapcar (lambda (elm)
-                (advice-remove (car elm) (cdr elm)))
-              advices))))
+                  (advice-remove (car elm) (cdr elm)))
+                advices)))))
 
 ;;;###autoload
 (defun ivy-posframe-enable ()



reply via email to

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