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

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

[elpa] externals/ivy-posframe e1624e7 027/195: ivy-posframe-display: sty


From: Feng Shu
Subject: [elpa] externals/ivy-posframe e1624e7 027/195: ivy-posframe-display: style -> style-or-poshandler
Date: Sat, 3 Oct 2020 07:11:38 -0400 (EDT)

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

    ivy-posframe-display:  style -> style-or-poshandler
---
 ivy-posframe.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index bc47716..981e09f 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -132,7 +132,7 @@ When nil, Using current frame's font as fallback."
 ;; Fix warn
 (defvar emacs-basic-display)
 
-(defun ivy-posframe-display (str &optional style)
+(defun ivy-posframe-display (str &optional style-or-poshandler)
   "Show STR in ivy's posframe."
   (if (not (ivy-posframe-workable-p))
       (ivy-display-function-fallback str)
@@ -144,8 +144,11 @@ When nil, Using current frame's font as fallback."
        (with-current-buffer (get-buffer-create " *Minibuf-1*")
          (concat (buffer-string) "  " str))
        :position (point)
-       :poshandler (cdr (assq (or style ivy-posframe-style)
-                              ivy-posframe-style-alist))
+       :poshandler
+       (if (functionp style-or-poshandler)
+           style-or-poshandler
+         (cdr (assq (or style-or-poshandler ivy-posframe-style)
+                    ivy-posframe-style-alist)))
        :background-color (face-attribute 'ivy-posframe :background)
        :foreground-color (face-attribute 'ivy-posframe :foreground)
        :height ivy-height



reply via email to

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