* lv.el (lv-use-separator): New option.
(lv-separator): New face.
(lv): New custom group.
(lv-message): Respect lv-use-separator using lv-separator.
Re #122
* hydra.el (hydra-keyboard-quit): Don't clear the message when
`hydra--ignore' is t.
* lv.el (lv-force-update): New defvar.
(lv-message): Refresh the window unless both the window contents haven't
changed and `lv-force-update' is nil.
Fixes#121
* hydra.el (hydra--format): Since the key spec is non-greedy, the width
spec should be non-greedy too.
Otherwise, the following will match more than _1_:
_1_: h1 _2_: h2
Fixes#117
* 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"))
* hydra.el (hydra-keyboard-quit): Update.
(hydra--make-defun): Update.
(hydra-timeout-timer): Rename from `hydra-timer'.
(hydra-message-timer): New defvar.
(hydra-idle-message): New defun.
(hydra-timeout): Update.
Small example:
(defhydra hydra-zoom (:idle 1.0)
"zoom"
("g" text-scale-increase "in")
("l" text-scale-decrease "out"))
(global-set-key (kbd "<f2> g") 'hydra-zoom/body)
With this code, `hydra-zoom/body' will display the hint not immediately
but after 1.0 seconds. If you manage to exit the hydra by then, the hint
will not be displayed. Other functions will display the hint
immediately.
Fixes#108
* hydra.el (hydra-disable): Try to reset `overriding-terminal-local-map'
for each frame, so that it doesn't happen that the hydra is cancelled
in one frame, but not in the other. `hydra-curr-on-exit' is called in
the first frame for which there's a transient map.
(hydra--clearfun): Disable when `overriding-terminal-local-map' is nil.
Fixes#105
* hydra.el (hydra-face-red):
(hydra-face-blue):
(hydra-face-amaranth):
(hydra-face-pink):
(hydra-face-teal): Improve docstrings.
(hydra--head-color): Simplify.
(defhydra): Use copy-sequence on inherited heads. Move :cmd-name setting
to the very end, when :exit is already set.
* hydra-test.el: Update tests.
* hydra.el (hydra--digit-argument): Update.
(hydra--negative-argument): Update.
Just flatten these two functions to their 25.2 bodies, and don't call
the `set-transient-map' variants, since the map remains anyway because
of `hydra-base-map'.
* hydra.el (hydra--body-exit): New defun.
(defhydra): Ensure that each head doesn't need the :exit info from the
body any more by putting the aggregated :exit in the head's own plist.
* hydra-test.el: Update tests.
Each hydra will now declare its own heads as a variable `foo/heads`.
It's possible to inherit them like this:
(defhydra hydra-zoom-child (:inherit (hydra-zoom/heads))
"zoom"
("q" nil))
One hydra can inherit from multiple parents. This one just adds a single
"q" head to the familiar hydra-zoom.
Fixes#57.
* hydra.el (hydra--message): Remove.
(hydra--make-defun): Update.
(defhydra): Replace "defun foo/hint" with "defvar foo/hint".
This will allow to dynamically modify the hint in the future.
* hydra-test.el: Update tests.
* hydra.el (hydra--clearfun): Update.
(hydra-keyboard-quit): Remove defcustom.
(defhydra): Update.
* hydra-test.el: Update tests.
(hydra-integration-1): Catch the 'quit signal, since now "C-g" is just a
plain `keyboard-quit'.
* hydra.el (hydra-curr-on-exit): New defvar.
(hydra-curr-foreign-keys): New defvar.
(hydra-clearfun): New defun.
(hydra-amaranth-warn): New defun.
(hydra-set-transient-map): Use own defun instead of `set-transient-map'.
(hydra--universal-argument): Update.
(hydra--make-defun): Update.
(hydra--handle-nonhead): Remove.
(defhydra): Update.
Re #90