[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master fa5643f 15/45: Quit Hydra for `handle-switch-frame'
From: |
Oleh Krehel |
Subject: |
[elpa] master fa5643f 15/45: Quit Hydra for `handle-switch-frame' |
Date: |
Thu, 16 Apr 2015 12:45:44 +0000 |
branch: master
commit fa5643f318539a800f93e9cb5b574b24c8d3879d
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Quit Hydra for `handle-switch-frame'
* hydra.el (hydra--clearfun): Update.
(hydra-base-map): Update.
(hydra--handle-switch-frame): Remove.
Re #90, #73.
---
hydra.el | 27 +++++++++++----------------
1 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/hydra.el b/hydra.el
index 1234cac..d302de8 100644
--- a/hydra.el
+++ b/hydra.el
@@ -107,15 +107,17 @@ warn: keep KEYMAP and issue a warning instead of running
the command."
(defun hydra--clearfun ()
"Disable the current Hydra unless `this-command' is a head."
- (unless (eq this-command
- (lookup-key hydra-curr-map (this-command-keys-vector)))
- (unless (cl-case hydra-curr-foreign-keys
- (warn
- (setq this-command 'hydra-amaranth-warn))
- (run
- t)
- (t nil))
- (hydra-disable))))
+ (if (eq this-command 'handle-switch-frame)
+ (hydra-disable)
+ (unless (eq this-command
+ (lookup-key hydra-curr-map (this-command-keys-vector)))
+ (unless (cl-case hydra-curr-foreign-keys
+ (warn
+ (setq this-command 'hydra-amaranth-warn))
+ (run
+ t)
+ (t nil))
+ (hydra-disable)))))
(defun hydra-disable ()
"Disable the current Hydra."
@@ -240,16 +242,9 @@ Vanquishable only through a blue head.")
(define-key map [kp-8] 'hydra--digit-argument)
(define-key map [kp-9] 'hydra--digit-argument)
(define-key map [kp-subtract] 'hydra--negative-argument)
- (define-key map [switch-frame] 'hydra--handle-switch-frame)
map)
"Keymap that all Hydras inherit. See `universal-argument-map'.")
-(defun hydra--handle-switch-frame (evt)
- "Quit hydra and call old switch-frame event handler for EVT."
- (interactive "e")
- (hydra-keyboard-quit)
- (funcall (lookup-key (current-global-map) [switch-frame]) evt))
-
(defun hydra--universal-argument (arg)
"Forward to (`universal-argument' ARG)."
(interactive "P")
- [elpa] master cc6accd 04/45: hydra.el (hydra--digit-argument): Fix for Emacs 24.3, (continued)
- [elpa] master cc6accd 04/45: hydra.el (hydra--digit-argument): Fix for Emacs 24.3, Oleh Krehel, 2015/04/16
- [elpa] master e4cae0a 03/45: hydra.el (defhydra): Simplify :cmd-name part, Oleh Krehel, 2015/04/16
- [elpa] master c06c006 02/45: Use set/defvar for keymap, Oleh Krehel, 2015/04/16
- [elpa] master e7aaafb 07/45: hydra.el (hydra-pink-fallback): Allow prefix arguments, Oleh Krehel, 2015/04/16
- [elpa] master d0cc1c5 01/45: Define a keymap var for each hydra and re-use it, Oleh Krehel, 2015/04/16
- [elpa] master 666048c 10/45: Update testing setup, Oleh Krehel, 2015/04/16
- [elpa] master f9bf8fe 08/45: hydra.el (hydra-set-transient-map): Update, Oleh Krehel, 2015/04/16
- [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 <=
- [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, 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