[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-posframe e0247bf 035/195: split ivy-posframe-setup
From: |
Feng Shu |
Subject: |
[elpa] externals/ivy-posframe e0247bf 035/195: split ivy-posframe-setup to ivy-posframe-init and ivy-posframe-setup |
Date: |
Sat, 3 Oct 2020 07:11:40 -0400 (EDT) |
branch: externals/ivy-posframe
commit e0247bf4e54c3e066b50f5661b57890061c9b4ee
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
split ivy-posframe-setup to ivy-posframe-init and ivy-posframe-setup
---
ivy-posframe.el | 39 ++++++++++++++++++++++-----------------
1 file changed, 22 insertions(+), 17 deletions(-)
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 701d86b..33b791b 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -199,23 +199,6 @@ This variable is useful for `ivy-posframe-read-action' .")
emacs-basic-display
(not (display-graphic-p))))))
-(defun ivy-posframe-setup ()
- "Setup ivy-posframe."
- (interactive)
- ;; Regedit all display functions of ivy-posframe
- ;; to `ivy-display-functions-props'.
- (mapatoms
- #'(lambda (func)
- (when (and (functionp func)
- (string-match-p "^ivy-posframe-display" (symbol-name func))
- (not (assq func ivy-display-functions-props)))
- (push `(,func :cleanup ivy-posframe-cleanup)
- ivy-display-functions-props))))
- ;; Re-configure ivy keymap.
- (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-dispatching-done ()
"Select one of the available actions and call `ivy-done'."
(interactive)
@@ -267,6 +250,28 @@ selection, non-nil otherwise."
(interactive)
(message "ivy-posframe: ivy-avy is not supported at the moment."))
+;;;###autoload
+(defun ivy-posframe-setup ()
+ "Setup ivy-posframe."
+ (interactive)
+ (require 'ivy)
+ (ivy-posframe-init)
+ (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 ()
+ "Add all display functions of ivy-posframe to
+`ivy-display-functions-props'."
+ (mapatoms
+ #'(lambda (func)
+ (when (and (functionp func)
+ (string-match-p "^ivy-posframe-display" (symbol-name func))
+ (not (assq func ivy-display-functions-props)))
+ (push `(,func :cleanup ivy-posframe-cleanup)
+ ivy-display-functions-props)))))
+
+(ivy-posframe-init)
(provide 'ivy-posframe)
- [elpa] externals/ivy-posframe cef74e6 021/195: Different command can set different ivy-posframe display function, (continued)
- [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, 2020/10/03
- [elpa] externals/ivy-posframe e0247bf 035/195: split ivy-posframe-setup to ivy-posframe-init and ivy-posframe-setup,
Feng Shu <=
- [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
- [elpa] externals/ivy-posframe 0989e42 039/195: Show cursor's position, fix #9, Feng Shu, 2020/10/03