branch: externals/ivy-posframe
commit 26a7ba744a06ef97811c79b9d723b0125267b512
Author: Feng Shu <[email protected]>
Commit: Feng Shu <[email protected]>
Add ivy-posframe-enable and use it
---
README.md | 36 ++++++++++++++++++------------------
ivy-posframe.el | 18 +++++++++---------
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/README.md b/README.md
index ed8014c..53f2855 100644
--- a/README.md
+++ b/README.md
@@ -3,21 +3,21 @@ Note: this file is converted from ivy-posframe.el by
[el2org](https://github.com
# 目录
-1. [ivy-posframe README](#orgcfa545c)
- 1. [What is ivy-posframe](#org3c6ad89)
- 2. [Display functions](#orgda8366d)
- 3. [How to enable ivy-posframe](#org4d648e7)
- 4. [Tips](#orgcef74d7)
- 1. [How to show fringe to ivy-posframe](#org7a32697)
- 2. [How to custom your ivy-posframe style](#org06a0215)
+1. [ivy-posframe README](#org73a5a3f)
+ 1. [What is ivy-posframe](#org711a00d)
+ 2. [Display functions](#org8ff600c)
+ 3. [How to enable ivy-posframe](#orgedfde9d)
+ 4. [Tips](#org7fbf393)
+ 1. [How to show fringe to ivy-posframe](#org79a88f5)
+ 2. [How to custom your ivy-posframe style](#orgd33a170)
-<a id="orgcfa545c"></a>
+<a id="org73a5a3f"></a>
# ivy-posframe README
-<a id="org3c6ad89"></a>
+<a id="org711a00d"></a>
## What is ivy-posframe
@@ -27,7 +27,7 @@ to show its candidate menu.
NOTE: ivy-posframe requires Emacs 26
-<a id="orgda8366d"></a>
+<a id="org8ff600c"></a>
## Display functions
@@ -43,14 +43,14 @@ NOTE: ivy-posframe requires Emacs 26

-<a id="org4d648e7"></a>
+<a id="orgedfde9d"></a>
## How to enable ivy-posframe
1. Global mode
(require 'ivy-posframe)
- (ivy-posframe-setup)
+ (ivy-posframe-enable)
(setq ivy-display-function #'ivy-posframe-display)
;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
@@ -60,23 +60,23 @@ NOTE: ivy-posframe requires Emacs 26
2. Per-command mode.
(require 'ivy-posframe)
- (ivy-posframe-setup)
+ (ivy-posframe-enable)
;; Different command can use different display function.
(push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left)
ivy-display-functions-alist)
(push '(complete-symbol . ivy-posframe-display-at-point)
ivy-display-functions-alist)
3. Fallback mode
(require 'ivy-posframe)
- (ivy-posframe-setup)
+ (ivy-posframe-enable)
(push '(t . ivy-posframe-display) ivy-display-functions-alist)
-<a id="orgcef74d7"></a>
+<a id="org7fbf393"></a>
## Tips
-<a id="org7a32697"></a>
+<a id="org79a88f5"></a>
### How to show fringe to ivy-posframe
@@ -88,7 +88,7 @@ By the way, User can set **any** parameters of ivy-posframe
with
the help of \`ivy-posframe-parameters'.
-<a id="org06a0215"></a>
+<a id="orgd33a170"></a>
### How to custom your ivy-posframe style
@@ -96,4 +96,4 @@ 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 needed.
+ (ivy-posframe-enable) ; This line is needed.
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 33b791b..5985ed5 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -51,7 +51,7 @@
;; 1. Global mode
;; #+BEGIN_EXAMPLE
;; (require 'ivy-posframe)
-;; (ivy-posframe-setup)
+;; (ivy-posframe-enable)
;; (setq ivy-display-function #'ivy-posframe-display)
;; ;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
;; ;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
@@ -62,7 +62,7 @@
;; 2. Per-command mode.
;; #+BEGIN_EXAMPLE
;; (require 'ivy-posframe)
-;; (ivy-posframe-setup)
+;; (ivy-posframe-enable)
;; ;; Different command can use different display function.
;; (push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left)
ivy-display-functions-alist)
;; (push '(complete-symbol . ivy-posframe-display-at-point)
ivy-display-functions-alist)
@@ -70,7 +70,7 @@
;; 3. Fallback mode
;; #+BEGIN_EXAMPLE
;; (require 'ivy-posframe)
-;; (ivy-posframe-setup)
+;; (ivy-posframe-enable)
;; (push '(t . ivy-posframe-display) ivy-display-functions-alist)
;; #+END_EXAMPLE
@@ -92,7 +92,7 @@
;; ;; #+BEGIN_EXAMPLE
;; (defun ivy-posframe-display-at-XXX (str)
;; (ivy-posframe--display str #'your-own-poshandler-function))
-;; (ivy-posframe-setup) ; This line is needed.
+;; (ivy-posframe-enable) ; This line is needed.
;; ;; #+END_EXAMPLE
;;; Code:
@@ -251,16 +251,16 @@ selection, non-nil otherwise."
(message "ivy-posframe: ivy-avy is not supported at the moment."))
;;;###autoload
-(defun ivy-posframe-setup ()
- "Setup ivy-posframe."
+(defun ivy-posframe-enable ()
+ "Enable ivy-posframe."
(interactive)
(require 'ivy)
- (ivy-posframe-init)
+ (ivy-posframe-setup)
(define-key ivy-minibuffer-map (kbd "C-M-a") 'ivy-posframe-read-action)
(define-key ivy-minibuffer-map (kbd "M-o") 'ivy-posframe-dispatching-done)
(define-key ivy-minibuffer-map (kbd "C-'") 'ivy-posframe-avy))
-(defun ivy-posframe-init ()
+(defun ivy-posframe-setup ()
"Add all display functions of ivy-posframe to
`ivy-display-functions-props'."
(mapatoms
@@ -271,7 +271,7 @@ selection, non-nil otherwise."
(push `(,func :cleanup ivy-posframe-cleanup)
ivy-display-functions-props)))))
-(ivy-posframe-init)
+(ivy-posframe-setup)
(provide 'ivy-posframe)