Skip to content

Commit 806e04b

Browse files
committed
Don't clutter Echo Area
* lv.el (lv-wnd): New variable. (lv-window): New defun to get a window similar in properties to Echo Area. (lv-message): New defun, a replacement for `message', that writes to `lv-window'. * hydra.el (hydra-lv): New defcustom. If nil, use the Echo Area, otherwise, use LV. (hydra-disable): Add optional arg KILL-LV. (hydra--message): New defun to dispatch on `hydra-lv'. (hydra--make-defun): Prematurely disable with LV only for blue heads, since regenerating LV window would cause screen tearing. No need for timeouts between `message' when using LV. HINT argument is now a function symbol that returns a string, instead of a plain string. (defhydra): Generate a new defun with name `NAME/hint'. * Makefile: Load lv. * hydra-test.el: Update all tests. * README.md: Update.
1 parent 06b35f7 commit 806e04b

File tree

5 files changed

+429
-331
lines changed

5 files changed

+429
-331
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
EMACS = emacs
22
# EMACS = emacs-24.3
33

4-
LOAD = -l hydra.el -l hydra-test.el
4+
LOAD = -l lv.el -l hydra.el -l hydra-test.el
55

66
.PHONY: all test clean
77

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,3 +266,14 @@ to a head. This sexp will be wrapped in an interactive lambda. Here's an example
266266
("q" nil "cancel"))
267267
(global-set-key (kbd "C-c r") 'hydra-launcher/body)
268268
```
269+
270+
## Define Hydra heads that don't show up in the hint at all
271+
272+
This can be done by setting the head's hint explicitly to `nil`, instead of the usual string.
273+
274+
## Use a dedicated window for Hydra hints
275+
276+
Since version `0.10.0`, setting `hydra-lv` to `t` (the default setting) will make it use a dedicated
277+
window right above the Echo Area for hints. This has the advantage that you can immediately see
278+
any `message` output from the functions that you call, since Hydra no longer uses `message` to display
279+
the hint. You can still have the old behavior by setting `hydra-lv` to `nil`.

0 commit comments

Comments
 (0)