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

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

[elpa] externals/ivy-posframe 7bfd14f 068/195: Add ivy-posframe-border f


From: Feng Shu
Subject: [elpa] externals/ivy-posframe 7bfd14f 068/195: Add ivy-posframe-border face and use it
Date: Sat, 3 Oct 2020 07:11:47 -0400 (EDT)

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

    Add ivy-posframe-border face and use it
---
 README.md       | 49 ++++++++++++++++++++-----------------------------
 ivy-posframe.el | 16 ++++++++--------
 2 files changed, 28 insertions(+), 37 deletions(-)

diff --git a/README.md b/README.md
index 775a01b..eb39709 100644
--- a/README.md
+++ b/README.md
@@ -3,25 +3,24 @@ Note: this file is auto converted from ivy-posframe.el by 
[el2org](https://githu
 
 # &#30446;&#24405;
 
-1.  [ivy-posframe README](#org68c65a1)
-    1.  [What is ivy-posframe](#org03624ec)
-    2.  [Display functions](#org99df55a)
-    3.  [How to enable ivy-posframe](#org2040f8e)
-        1.  [Global mode](#org6cc7219)
-        2.  [Per-command mode.](#orgcd58b06)
-        3.  [Fallback mode](#org7941a0a)
-    4.  [Tips](#org5cfed99)
-        1.  [How to let ivy-posframe show border](#orgb370bbe)
-        2.  [How to show fringe to ivy-posframe](#orgb28f068)
-        3.  [How to custom your ivy-posframe style](#org96e6893)
+1.  [ivy-posframe README](#org3d85bc4)
+    1.  [What is ivy-posframe](#org5b2bac3)
+    2.  [Display functions](#org76e7f43)
+    3.  [How to enable ivy-posframe](#org45fc4c8)
+        1.  [Global mode](#orge1a8047)
+        2.  [Per-command mode.](#org13272c5)
+        3.  [Fallback mode](#org2f40fde)
+    4.  [Tips](#org0d52e7c)
+        1.  [How to show fringe to ivy-posframe](#orgcf3e519)
+        2.  [How to custom your ivy-posframe style](#org841efef)
 
 
-<a id="org68c65a1"></a>
+<a id="org3d85bc4"></a>
 
 # ivy-posframe README
 
 
-<a id="org03624ec"></a>
+<a id="org5b2bac3"></a>
 
 ## What is ivy-posframe
 
@@ -32,7 +31,7 @@ NOTE: ivy-posframe requires Emacs 26 and do not support mouse
 click.
 
 
-<a id="org99df55a"></a>
+<a id="org76e7f43"></a>
 
 ## Display functions
 
@@ -48,12 +47,12 @@ click.
     ![img](./snapshots/ivy-posframe-display-at-point.png)
 
 
-<a id="org2040f8e"></a>
+<a id="org45fc4c8"></a>
 
 ## How to enable ivy-posframe
 
 
-<a id="org6cc7219"></a>
+<a id="orge1a8047"></a>
 
 ### Global mode
 
@@ -67,7 +66,7 @@ click.
     (ivy-posframe-enable)
 
 
-<a id="orgcd58b06"></a>
+<a id="org13272c5"></a>
 
 ### Per-command mode.
 
@@ -89,7 +88,7 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 "C-h v this-command" is a good idea.
 
 
-<a id="org7941a0a"></a>
+<a id="org2f40fde"></a>
 
 ### Fallback mode
 
@@ -98,20 +97,12 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
     (ivy-posframe-enable)
 
 
-<a id="org5cfed99"></a>
+<a id="org0d52e7c"></a>
 
 ## Tips
 
 
-<a id="orgb370bbe"></a>
-
-### How to let ivy-posframe show border
-
-    (set-face-attribute 'internal-border nil :background "gray50")
-    (setq ivy-posframe-border-width 1)
-
-
-<a id="orgb28f068"></a>
+<a id="orgcf3e519"></a>
 
 ### How to show fringe to ivy-posframe
 
@@ -123,7 +114,7 @@ By the way, User can set **any** parameters of ivy-posframe 
with
 the help of \`ivy-posframe-parameters'.
 
 
-<a id="org96e6893"></a>
+<a id="org841efef"></a>
 
 ### How to custom your ivy-posframe style
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 4b35100..662ea5d 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -91,12 +91,6 @@
 
 ;; ** Tips
 
-;; *** How to let ivy-posframe show border
-;; #+BEGIN_EXAMPLE
-;; (set-face-attribute 'internal-border nil :background "gray50")
-;; (setq ivy-posframe-border-width 1)
-;; #+END_EXAMPLE
-
 ;; *** How to show fringe to ivy-posframe
 ;; #+BEGIN_EXAMPLE
 ;; (setq ivy-posframe-parameters
@@ -158,7 +152,7 @@ When nil, Using current frame's font as fallback."
   :group 'ivy-posframe
   :type 'number)
 
-(defcustom ivy-posframe-border-width 0
+(defcustom ivy-posframe-border-width 1
   "The border width used by ivy-posframe.
 When 0, no border is showed."
   :group 'ivy-posframe
@@ -179,6 +173,11 @@ When 0, no border is showed."
   "Face used by the ivy-posframe."
   :group 'ivy-posframe)
 
+(defface ivy-posframe-border
+  '((t (:inherit default :background "gray50")))
+  "Face used by the ivy-posframe."
+  :group 'ivy-posframe)
+
 (defface ivy-posframe-cursor
   '((t (:inherit cursor)))
   "Face used by the ivy-posframe's fake cursor."
@@ -219,7 +218,8 @@ This variable is useful for `ivy-posframe-read-action' .")
        :min-height (or ivy-posframe-min-height 10)
        :min-width (or ivy-posframe-min-width 50)
        :internal-border-width ivy-posframe-border-width
-       :override-parameters ivy-posframe-parameters))))
+       :override-parameters ivy-posframe-parameters
+       :face-remap '((internal-border . ivy-posframe-border))))))
 
 (defun ivy-posframe-display (str)
   (let ((func (intern (format "ivy-posframe-display-at-%s"



reply via email to

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