branch: master
commit a179f3157c378de073a96bd244499ca85988b327
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    Unbind hydra's body unconditionally to avoid error
    
    * hydra.el (hydra-create): Since body will be established as a prefix,
      it can't be bound anyway. Unbind it preemptively and unconditionally.
---
 hydra.el |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/hydra.el b/hydra.el
index 14b1282..9b65f03 100644
--- a/hydra.el
+++ b/hydra.el
@@ -67,8 +67,7 @@ is broken once any key binding that is not in HEADS is 
called."
                      (intern (format "hydra-%s-%S" body (cdr x)))))
                  heads)))
     `(progn
-       (when (global-key-binding ,(kbd body))
-         (global-set-key ,(kbd body) nil))
+       (global-set-key ,(kbd body) nil)
        ,@(cl-mapcar
           (lambda (head name)
             `(defun ,name ()

Reply via email to