branch: master commit 62f9b058f4e680b7cc89e46df05a23571349c846 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
Allow some heads with no hints * hydra.el (hydra--hint): If the HINT part of HEAD is explicitely nil, omit it from the compound hint. Example: (global-set-key (kbd "C-M-o") (defhydra hydra-window (:color amaranth) "window" ("h" windmove-left nil) ("j" windmove-down nil) ("k" windmove-up nil) ("l" windmove-right nil) ("v" (lambda () (interactive) (split-window-right) (windmove-right)) "vert") ("x" (lambda () (interactive) (split-window-below) (windmove-down)) "horz") ("q" nil "cancel"))) Here, "h", "j", "k", "l" will not be in the echo area. --- hydra.el | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/hydra.el b/hydra.el index 2770fbc..a1bc9e9 100644 --- a/hydra.el +++ b/hydra.el @@ -225,7 +225,12 @@ It's intended for the echo area, when a Hydra is active." (propertize (car h) 'face (hydra--face h body-color)))) - heads ", "))) + (cl-remove-if + (lambda (x) + (and (> (length x) 2) + (null (cl-caddr x)))) + heads) + ", "))) (defun hydra-disable () "Disable the current Hydra."