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

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

[elpa] master b65db57 02/17: Update :post for amaranth Hydras


From: Oleh Krehel
Subject: [elpa] master b65db57 02/17: Update :post for amaranth Hydras
Date: Tue, 10 Feb 2015 07:13:22 +0000

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

    Update :post for amaranth Hydras
    
    * hydra.el (defhydra): Since the transient map isn't technically going
      away when a foreign key binding is pressed, don't call :post in that
      case. This means that only blue heads will call :post for Hydras with
      amaranth body.
    
    Fixes #17.
---
 hydra.el |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/hydra.el b/hydra.el
index 6cbe705..b615c1e 100644
--- a/hydra.el
+++ b/hydra.el
@@ -353,7 +353,8 @@ in turn can be either red or blue."
                                (hydra-set-transient-map
                                 (setq hydra-curr-map ',keymap)
                                 t
-                                ,@(if body-post `((lambda () 
,body-post))))))))))
+                                ,@(if (and body-post (not (eq body-color 
'amaranth)))
+                                      `((lambda () ,body-post))))))))))
           heads names)
        ,@(unless (or (null body-key)
                      (null method)
@@ -382,7 +383,8 @@ in turn can be either red or blue."
                (hydra-set-transient-map
                 ',keymap
                 t
-                ,@(if body-post `((lambda () ,body-post)))))))))
+                ,@(if (and body-post (not (eq body-color 'amaranth)))
+                      `((lambda () ,body-post)))))))))
 
 (provide 'hydra)
 



reply via email to

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