branch: externals/ivy-posframe
commit 6494b3880bf243a465b4ca26e973f2c5a8578efd
Author: Feng Shu <[email protected]>
Commit: Feng Shu <[email protected]>
Add ivy-posframe-mode
---
ivy-posframe.el | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/ivy-posframe.el b/ivy-posframe.el
index b041f34..9fcd864 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -83,10 +83,15 @@ Using current frame's font if it it nil."
(not (display-graphic-p))))))
;;;###autoload
-(defun ivy-posframe-enable ()
- (interactive)
- (setq ivy-display-function #'ivy-posframe-display)
- (message "Ivy-posframe is enabled, disable it need restart emacs."))
+(define-minor-mode ivy-posframe-mode
+ "ivy-posframe minor mode."
+ :global t
+ :require 'ivy-posframe
+ :group 'ivy-posframe
+ :lighter " ivy-posframe"
+ (if ivy-posframe-mode
+ (setq ivy-display-function #'ivy-posframe-display)
+ (setq ivy-display-function nil)))
(provide 'ivy-posframe)