branch: externals/ivy-posframe
commit 9e01129448c4fed0acfbf99a38981cb54179c697
Author: Feng Shu <[email protected]>
Commit: Feng Shu <[email protected]>
Remove ivy-posframe-setup
---
ivy-posframe.el | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/ivy-posframe.el b/ivy-posframe.el
index e6723b2..9b5b1bd 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -424,7 +424,15 @@ selection, non-nil otherwise."
"Enable ivy-posframe."
(interactive)
(require 'ivy)
- (ivy-posframe-setup)
+ ;; 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))))
(define-key ivy-minibuffer-map
[remap ivy-read-action] 'ivy-posframe-read-action)
(define-key ivy-minibuffer-map
@@ -434,17 +442,6 @@ selection, non-nil otherwise."
(advice-add 'ivy--minibuffer-setup :around #'ivy-posframe--minibuffer-setup)
(message "ivy-posframe is enabled, disabling it need to reboot emacs."))
-(defun ivy-posframe-setup ()
- "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)))))
-
(provide 'ivy-posframe)
;; Local Variables: