emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master dbd77f0 09/27: Don't unbind hydra's body, unless using glo


From: Oleh Krehel
Subject: [elpa] master dbd77f0 09/27: Don't unbind hydra's body, unless using global-set-key
Date: Sat, 24 Jan 2015 20:36:31 +0000

branch: master
commit dbd77f056bda12c559f65d0034fb3b04301b71fb
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    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 ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]