[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master e88839c 17/45: Don't double-call :post
From: |
Oleh Krehel |
Subject: |
[elpa] master e88839c 17/45: Don't double-call :post |
Date: |
Thu, 16 Apr 2015 12:45:45 +0000 |
branch: master
commit e88839ca5fa1b48082d2443e262cdf372f9e3702
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Don't double-call :post
* hydra.el (hydra--make-defun): Update.
* hydra-test.el: Update tests.
:post will be called via `hydra-curr-on-exit' in `hydra-disable'.
Re #90
---
hydra-test.el | 22 +++++++---------------
hydra.el | 8 ++------
2 files changed, 9 insertions(+), 21 deletions(-)
diff --git a/hydra-test.el b/hydra-test.el
index d079451..0ac6a8f 100644
--- a/hydra-test.el
+++ b/hydra-test.el
@@ -261,8 +261,7 @@ Call the head: `toggle-truncate-lines'."
(hydra-keyboard-quit)
(call-interactively
(function
- toggle-truncate-lines))
- nil)
+ toggle-truncate-lines)))
(defun hydra-toggle/auto-fill-mode-and-exit nil
"Create a hydra with no body and the heads:
@@ -278,8 +277,7 @@ Call the head: `auto-fill-mode'."
(hydra-default-pre)
(hydra-keyboard-quit)
(call-interactively
- (function auto-fill-mode))
- nil)
+ (function auto-fill-mode)))
(defun hydra-toggle/abbrev-mode-and-exit nil
"Create a hydra with no body and the heads:
@@ -295,8 +293,7 @@ Call the head: `abbrev-mode'."
(hydra-default-pre)
(hydra-keyboard-quit)
(call-interactively
- (function abbrev-mode))
- nil)
+ (function abbrev-mode)))
(defun hydra-toggle/nil nil
"Create a hydra with no body and the heads:
@@ -311,7 +308,6 @@ Call the head: `nil'."
(interactive)
(hydra-default-pre)
(hydra-keyboard-quit)
- nil
nil)
(defun hydra-toggle/hint nil
(if hydra-lv
@@ -412,8 +408,7 @@ Call the head: `hydra-keyboard-quit'."
(set-cursor-color "#e52b50")
(hydra-keyboard-quit)
(call-interactively
- (function hydra-keyboard-quit))
- (set-cursor-color "#ffffff"))
+ (function hydra-keyboard-quit)))
(defun hydra-vi/next-line nil
"Create a hydra with no body and the heads:
@@ -485,8 +480,7 @@ Call the head: `nil'."
(hydra-default-pre)
(set-cursor-color "#e52b50")
(hydra-keyboard-quit)
- nil
- (set-cursor-color "#ffffff"))
+ nil)
(defun hydra-vi/hint nil
(if hydra-lv
(lv-message
@@ -608,8 +602,7 @@ Call the head: `(text-scale-set 0)'."
(function
(lambda nil
(interactive)
- (text-scale-set 0))))
- nil)
+ (text-scale-set 0)))))
(defun hydra-zoom/hint nil
(if hydra-lv
(lv-message
@@ -727,8 +720,7 @@ Call the head: `(text-scale-set 0)'."
(function
(lambda nil
(interactive)
- (text-scale-set 0))))
- nil)
+ (text-scale-set 0)))))
(defun hydra-zoom/hint nil
(if hydra-lv
(lv-message
diff --git a/hydra.el b/hydra.el
index d302de8..502b6a8 100644
--- a/hydra.el
+++ b/hydra.el
@@ -581,8 +581,7 @@ OTHER-POST is an optional extension to the :post key of
BODY."
,@(when body-pre (list body-pre))
,@(if (memq color '(blue teal))
`((hydra-keyboard-quit)
- ,(when cmd `(call-interactively #',cmd))
- ,body-post)
+ ,(when cmd `(call-interactively #',cmd)))
(delq
nil
`(,(when cmd
@@ -606,10 +605,7 @@ OTHER-POST is an optional extension to the :post key of
BODY."
nil)))
,(or other-post
(when body-timeout
- `(hydra-timeout
- ,body-timeout
- ,(when body-post
- (hydra--make-callable body-post)))))))))))
+ `(hydra-timeout ,body-timeout)))))))))
(defmacro hydra--make-funcall (sym)
"Transform SYM into a `funcall' that calls it."
- [elpa] master 60483cb 09/45: Add integration testing, (continued)
- [elpa] master 60483cb 09/45: Add integration testing, Oleh Krehel, 2015/04/16
- [elpa] master 4dde4f7 11/45: hydra.el (hydra--format): Add some more symbols, Oleh Krehel, 2015/04/16
- [elpa] master 3fce2bd 12/45: Try to re-encode the input in the terminal, Oleh Krehel, 2015/04/16
- [elpa] master fa5643f 15/45: Quit Hydra for `handle-switch-frame', Oleh Krehel, 2015/04/16
- [elpa] master af39a98 14/45: Adapt to the new `hydra-set-transient-map', Oleh Krehel, 2015/04/16
- [elpa] master acdec5b 27/45: Add an integration test for digit args in amaranth, Oleh Krehel, 2015/04/16
- [elpa] master 1a54e09 05/45: hydra.el (hydra--make-funcall): Update location, Oleh Krehel, 2015/04/16
- [elpa] master b351b7c 24/45: hydra.el (hydra--body-color): Remove, Oleh Krehel, 2015/04/16
- [elpa] master 5787a4d 13/45: Move away from setting "t" in keymaps, Oleh Krehel, 2015/04/16
- [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 <=
- [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, 2015/04/16
- [elpa] master 986226f 18/45: Simplify `keyboard-quit', Oleh Krehel, 2015/04/16