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

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

[elpa] externals/ivy-posframe 3bc6301 004/195: Add ivy-posframe-workable


From: Feng Shu
Subject: [elpa] externals/ivy-posframe 3bc6301 004/195: Add ivy-posframe-workable-p
Date: Sat, 3 Oct 2020 07:11:34 -0400 (EDT)

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

    Add ivy-posframe-workable-p
---
 ivy-posframe.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index ac28f8c..b041f34 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -33,10 +33,12 @@
 ;; * ivy-posframe's code
 (require 'cl-lib)
 (require 'posframe)
+(require 'ivy)
 
 (push '(ivy-posframe-display
+        :when ivy-posframe-workable-p
         :cleanup ivy-posframe-cleanup)
-      ivy-display-function-props)
+      ivy-display-functions-props)
 
 (defgroup ivy-posframe nil
   "Using posframe to show ivy"
@@ -73,6 +75,13 @@ Using current frame's font if it it nil."
   "Clean ivy's posframe."
   (posframe-hide ivy-posframe-buffer))
 
+(defun ivy-posframe-workable-p ()
+  "Test ivy-posframe workable or not."
+  (and (>= emacs-major-version 26)
+       (not (or noninteractive
+                emacs-basic-display
+                (not (display-graphic-p))))))
+
 ;;;###autoload
 (defun ivy-posframe-enable ()
   (interactive)



reply via email to

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