* hydra.el (hydra-deactivate): New defvar. (hydra-set-transient-map): When `hydra-deactivate' is set, quit. (hydra-disable): Make sure that `hydra-deactivate' is reset back to nil. Fixes #115 Example: zoom in at most 5 times, then quit. (defvar hydra-zoom-amount 1) (defhydra hydra-zoom (global-map "<f2>") "zoom" ("g" (if (>= hydra-zoom-amount 5) (progn (setq hydra-zoom-amount 1) (setq hydra-deactivate t)) (cl-incf hydra-zoom-amount) (call-interactively 'text-scale-increase)) "in") ("l" text-scale-decrease "out"))master
parent
8be0bff746
commit
192c5b07d0
1 changed files with 12 additions and 5 deletions
Loading…
Reference in new issue