branch: master
commit dbd77f056bda12c559f65d0034fb3b04301b71fb
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
Don't unbind hydra's body, unless using global-set-key
* hydra.el (hydra-create): Update.
Fixes #3.
---
hydra.el | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/hydra.el b/hydra.el
index 2bb4538..b997cc2 100644
--- a/hydra.el
+++ b/hydra.el
@@ -95,15 +95,16 @@ When `(keymapp METHOD)`, it becomes:
(hint (concat "hydra: "
(mapconcat
(lambda (h) (if (caddr h)
- (format "[%s]: %s"
- (propertize (car h)
- 'face
'font-lock-keyword-face)
- (caddr h))
- (propertize (car h) 'face
'font-lock-keyword-face)))
+ (format "[%s]: %s"
+ (propertize (car h)
+ 'face
'font-lock-keyword-face)
+ (caddr h))
+ (propertize (car h) 'face
'font-lock-keyword-face)))
heads ", ")
".")))
`(progn
- (,method ,(kbd body) nil)
+ (when (eq ,method 'global-set-key)
+ (global-set-key ,(kbd body) nil))
,@(cl-mapcar
(lambda (head name)
`(defun ,name ()