[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 19cc1be 21/45: Use `unwind-protect' for :after-exit
From: |
Oleh Krehel |
Subject: |
[elpa] master 19cc1be 21/45: Use `unwind-protect' for :after-exit |
Date: |
Thu, 16 Apr 2015 12:45:47 +0000 |
branch: master
commit 19cc1be6ffbe16a6c6b86ec202ffc83e614e451b
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Use `unwind-protect' for :after-exit
* hydra.el (hydra--make-defun): Update.
This change makes "C-g" work for this hydra:
(defhydra hydra-goto-line (global-map "M-g"
:pre (linum-mode 1)
:after-exit (linum-mode -1)
:exit t)
("g" goto-line "line")
("c" goto-char "char"))
Re #90
---
hydra.el | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/hydra.el b/hydra.el
index bfb003b..3dd7459 100644
--- a/hydra.el
+++ b/hydra.el
@@ -579,8 +579,11 @@ BODY-AFTER-EXIT is added to the end of the wrapper."
,@(when body-pre (list body-pre))
,@(if (memq color '(blue teal))
`((hydra-keyboard-quit)
- ,(when cmd `(call-interactively #',cmd))
- ,@(when body-after-exit (list body-after-exit)))
+ ,(if body-after-exit
+ `(unwind-protect
+ ,(when cmd `(call-interactively #',cmd))
+ ,body-after-exit)
+ (when cmd `(call-interactively #',cmd))))
(delq
nil
`(,(when cmd
- [elpa] master 5379642 06/45: Use `hydra-keyboard-quit' instead of `hydra-cleanup', (continued)
- [elpa] master 5379642 06/45: Use `hydra-keyboard-quit' instead of `hydra-cleanup', Oleh Krehel, 2015/04/16
- [elpa] master e88839c 17/45: Don't double-call :post, Oleh Krehel, 2015/04/16
- [elpa] master 2f07e50 26/45: Account for digit argument, Oleh Krehel, 2015/04/16
- [elpa] master 8875bf1 28/45: Make digit and negative arguments work in 24.3, Oleh Krehel, 2015/04/16
- [elpa] master 0ae639f 22/45: Use a variable instead of a function for the hint, Oleh Krehel, 2015/04/16
- [elpa] master d71386b 29/45: hydra.el (hydra--head-color): Simplify, Oleh Krehel, 2015/04/16
- [elpa] master 22348d7 23/45: hydra.el (hydra--face): Remove, Oleh Krehel, 2015/04/16
- [elpa] master 88f14a0 30/45: hydra.el (hydra--head-color): Remove, Oleh Krehel, 2015/04/16
- [elpa] master cb630df 16/45: Update the tests for the new `hydra-set-transient-map', Oleh Krehel, 2015/04/16
- [elpa] master 566aab7 31/45: Set `this-command' when appropriate, Oleh Krehel, 2015/04/16
- [elpa] master 19cc1be 21/45: Use `unwind-protect' for :after-exit,
Oleh Krehel <=
- [elpa] master 986226f 18/45: Simplify `keyboard-quit', Oleh Krehel, 2015/04/16
- [elpa] master 51e7753 19/45: Alias :post to :before-exit, and add :after-exit, Oleh Krehel, 2015/04/16
- [elpa] master 3d7d8c7 20/45: Add basic error handling, Oleh Krehel, 2015/04/16
- [elpa] master 684f8a2 39/45: Add integration test for red hydras temporarily exiting, Oleh Krehel, 2015/04/16
- [elpa] master d3d435d 25/45: Finalize head inheritance, Oleh Krehel, 2015/04/16
- [elpa] master b2c9ea6 36/45: README.md: Update intro, Oleh Krehel, 2015/04/16
- [elpa] master d678cc0 34/45: Work around `overriding-terminal-local-map' being terminal-local, Oleh Krehel, 2015/04/16
- [elpa] master d6e00ed 33/45: README.md: Add video demo link, Oleh Krehel, 2015/04/16
- [elpa] master 97c9b9b 32/45: Move `this-command' setter, Oleh Krehel, 2015/04/16
- [elpa] master 60ce256 41/45: Add an idle message timeout option, Oleh Krehel, 2015/04/16