branch: master commit b65db57adb60d71292c38cc122f6548c61560b9b Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
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)