branch: master
commit e403363fad96d39df7217528dfb723039d8239ff
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
hydra.el (defhydra): Avoid eager macroexpansion failure
* hydra.el (defhydra): Don't test with keymapp, unless the symbol is
bound. When the mode isn't loaded yet, the keymap symbol isn't bound.
---
hydra.el | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/hydra.el b/hydra.el
index a3cdfac..13bf080 100644
--- a/hydra.el
+++ b/hydra.el
@@ -959,7 +959,9 @@ result of `defhydra'."
((hydra--callablep bind)
`(funcall ,bind ,final-key (function ,name)))
((and (symbolp bind)
- (keymapp (symbol-value bind)))
+ (if (boundp bind)
+ (keymapp (symbol-value bind))
+ t))
`(define-key ,bind ,final-key (function
,name)))
(t
(error "Invalid :bind property `%S' for head
%S" bind head)))))))