branch: externals/hydra
commit 406988f6e94a6844b38594f8e7b8fb7f98c89710
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
hydra.el (hydra-posframe-show-params): Add
Fixes #328
---
hydra.el | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/hydra.el b/hydra.el
index ae8b0dc2db..daf94043eb 100644
--- a/hydra.el
+++ b/hydra.el
@@ -211,16 +211,21 @@ the body or the head."
(declare-function posframe-hide "posframe")
(declare-function posframe-poshandler-window-center "posframe")
+(defvar hydra-posframe-show-params
+ '(:internal-border-width 1
+ :internal-border-color "red"
+ :poshandler posframe-poshandler-window-center)
+ "List of parameters passed to `posframe-show'.")
+
(defun hydra-posframe-show (str)
(require 'posframe)
- (posframe-show
- " *hydra-posframe*"
- :string str
- :internal-border-width 1
- :internal-border-color "red"
- :poshandler #'posframe-poshandler-window-center))
+ (apply #'posframe-show
+ " *hydra-posframe*"
+ :string str
+ hydra-posframe-show-params))
(defun hydra-posframe-hide ()
+ (require 'posframe)
(posframe-hide " *hydra-posframe*"))
(defvar hydra-hint-display-alist