branch: master commit 785f837ab0326e65066d22ac6eaaa5c15fa03d33 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
hydra.el (defhydra): Use `clear-temporary-overlay-map' * hydra.el (defhydra): Add a fix for old Emacs versions that don't have `set-transient-map'. Fixes #10. --- hydra.el | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hydra.el b/hydra.el index 6f21215..c453dea 100644 --- a/hydra.el +++ b/hydra.el @@ -170,7 +170,10 @@ HEADS is a list of (KEY CMD &optional HINT)." ,(format "%s\n\nCall the head: `%S'." doc (cadr head)) (interactive) ,@(if (null (cadr head)) - '((when hydra-last (funcall hydra-last))) + '((if (functionp hydra-last) + (funcall hydra-last) + (ignore-errors + (funcall 'clear-temporary-overlay-map)))) `((call-interactively #',(cadr head)) (when hydra-is-helpful (message ,hint))