[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-posframe 061a125 030/195: Re-add ivy-posframe-style
From: |
Feng Shu |
Subject: |
[elpa] externals/ivy-posframe 061a125 030/195: Re-add ivy-posframe-style for compatible |
Date: |
Sat, 3 Oct 2020 07:11:39 -0400 (EDT) |
branch: externals/ivy-posframe
commit 061a12550c5b7c75b345c4005c80b67436693608
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
Re-add ivy-posframe-style for compatible
---
README.md | 24 ++++++++++++------------
ivy-posframe.el | 15 ++++++++++++---
2 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
index ba5e89c..296cb54 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,19 @@
# 目录
-1. [ivy-posframe README](#orgad72029)
- 1. [What is ivy-posframe](#orgf3fce48)
- 2. [Display functions](#org1420034)
- 3. [How to enable ivy-posframe](#orgcd8666c)
- 4. [How to custom your ivy-posframe style](#org7c1f241)
+1. [ivy-posframe README](#orgcc900c2)
+ 1. [What is ivy-posframe](#org5f83be3)
+ 2. [Display functions](#org24f03db)
+ 3. [How to enable ivy-posframe](#orgcedf7a7)
+ 4. [How to custom your ivy-posframe style](#org7b3c825)
-<a id="orgad72029"></a>
+<a id="orgcc900c2"></a>
# ivy-posframe README
-<a id="orgf3fce48"></a>
+<a id="org5f83be3"></a>
## What is ivy-posframe
@@ -23,7 +23,7 @@ to show its candidate menu.
NOTE: ivy-posframe requires Emacs 26
-<a id="org1420034"></a>
+<a id="org24f03db"></a>
## Display functions
@@ -39,7 +39,7 @@ NOTE: ivy-posframe requires Emacs 26
![img](./snapshots/ivy-posframe-display-at-point.gif)
-<a id="orgcd8666c"></a>
+<a id="orgcedf7a7"></a>
## How to enable ivy-posframe
@@ -64,15 +64,15 @@ NOTE: ivy-posframe requires Emacs 26
(push '(t . ivy-posframe-display) ivy-display-functions-alist)
-<a id="org7c1f241"></a>
+<a id="org7b3c825"></a>
## How to custom your ivy-posframe style
The simplest way is:
(defun ivy-posframe-display-at-XXX (str)
- (ivy-posframe-display str 'your-own-poshandler-function))
- (ivy-posframe-setup) ; This line is need.
+ (ivy-posframe--display str #'your-own-poshandler-function))
+ (ivy-posframe-setup) ; This line is needed.
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 622ba41..9f2d8bf 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -76,8 +76,8 @@
;; The simplest way is:
;; ;; #+BEGIN_EXAMPLE
;; (defun ivy-posframe-display-at-XXX (str)
-;; (ivy-posframe-display str 'your-own-poshandler-function))
-;; (ivy-posframe-setup) ; This line is need.
+;; (ivy-posframe--display str #'your-own-poshandler-function))
+;; (ivy-posframe-setup) ; This line is needed.
;; ;; #+END_EXAMPLE
;;; Code:
@@ -91,6 +91,11 @@
:group 'ivy
:prefix "ivy-posframe")
+(defcustom ivy-posframe-style 'window-bottom-left
+ "The style of ivy-posframe."
+ :group 'ivy-posframe
+ :type 'string)
+
(defcustom ivy-posframe-font nil
"The font used by ivy-posframe.
When nil, Using current frame's font as fallback."
@@ -128,7 +133,11 @@ When nil, Using current frame's font as fallback."
:min-width 50))))
(defun ivy-posframe-display (str)
- (ivy-posframe--display str #'posframe-poshandler-frame-bottom-left-corner))
+ (let ((func (intern (format "ivy-posframe-display-at-%s"
+ ivy-posframe-style))))
+ (if (functionp func)
+ (funcall func str)
+ (ivy-posframe-display-at-frame-bottom-left str))))
(defun ivy-posframe-display-at-window-center (str)
(ivy-posframe--display str #'posframe-poshandler-window-center))
- [elpa] externals/ivy-posframe c36250a 013/195: Update README, (continued)
- [elpa] externals/ivy-posframe c36250a 013/195: Update README, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe cef74e6 021/195: Different command can set different ivy-posframe display function, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 5482c07 024/195: Update README, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 1f3dbf4 026/195: Add ivy-posframe-setup and use it., Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 0be1372 029/195: Remove ivy-posframe-style variable, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 387045c 032/195: Fix README, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 26a7ba7 036/195: Add ivy-posframe-enable and use it, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe b9b9a45 038/195: Update, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 9f6b58d 040/195: Cursor face inherits from regular cursor face, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 266d622 042/195: Set ivy-posframe-cursor as mulitcursor, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 061a125 030/195: Re-add ivy-posframe-style for compatible,
Feng Shu <=
- [elpa] externals/ivy-posframe e0247bf 035/195: split ivy-posframe-setup to ivy-posframe-init and ivy-posframe-setup, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 3784f59 054/195: ivy-posframe.el (ivy-posframe-avy): Simplify, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe ddaf875 020/195: Add Emacs version requirement to README, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 7e871bd 022/195: Fix type: buttom -> bottom, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 823d3db 023/195: Update README, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 0f159d5 025/195: Add frame-bottom-window-center style, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe e1624e7 027/195: ivy-posframe-display: style -> style-or-poshandler, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 5312e07 031/195: Add ivy-posframe-parameters, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 8f62984 033/195: Add ivy-posframe-read-action and ivy-posframe-dispatching-done, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 26e3a64 034/195: ivy-posframe: add ivy-posframe-avy, Feng Shu, 2020/10/03