branch: master
commit f9bf8feeb0e139e13bdb9d9722201c9a3879cef7
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    hydra.el (hydra-set-transient-map): Update
    
    A quick fix for the recursion issue in Emacs 25.
    
    I'll have to see at some point why the recursion was happening.
    
    Fixes #101
---
 hydra.el |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/hydra.el b/hydra.el
index 2c06c66..da7f58e 100644
--- a/hydra.el
+++ b/hydra.el
@@ -79,12 +79,11 @@
 (require 'cl-lib)
 (require 'lv)
 
-(defalias 'hydra-set-transient-map
-    (if (fboundp 'set-transient-map)
-        'set-transient-map
-      (lambda (map _keep-pred &optional on-exit)
-        (with-no-warnings
-          (set-temporary-overlay-map map (hydra--pred on-exit))))))
+(defun hydra-set-transient-map (map _keep-pred &optional on-exit)
+  (if (fboundp 'set-transient-map)
+      (set-transient-map map (hydra--pred on-exit))
+    (with-no-warnings
+      (set-temporary-overlay-map map (hydra--pred on-exit)))))
 
 (defun hydra--pred (on-exit)
   "Generate a predicate on whether to continue the Hydra state.

Reply via email to