[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 640af46 13/18: hydra.el (defhydra): Improve docstring
From: |
Oleh Krehel |
Subject: |
[elpa] master 640af46 13/18: hydra.el (defhydra): Improve docstring |
Date: |
Sat, 28 Mar 2015 15:04:28 +0000 |
branch: master
commit 640af46e49682b3ec21dc3183a25e47de555abb4
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
hydra.el (defhydra): Improve docstring
---
hydra.el | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/hydra.el b/hydra.el
index 51b9139..a1fee76 100644
--- a/hydra.el
+++ b/hydra.el
@@ -836,7 +836,7 @@ defined here.
BODY has the format:
- (BODY-MAP BODY-KEY &rest PLIST)
+ (BODY-MAP BODY-KEY &rest BODY-PLIST)
DOCSTRING will be displayed in the echo area to identify the
Hydra. When DOCSTRING starts with a newline, special Ruby-style
@@ -851,7 +851,7 @@ BODY-MAP is a keymap; `global-map' is used quite often.
Each
function generated from HEADS will be bound in BODY-MAP to
BODY-KEY + KEY (both are strings passed to `kbd'), and will set
the transient map so that all following heads can be called
-though KEY only.
+though KEY only. BODY-KEY can be an empty string.
CMD is a callable expression: either an interactive function
name, or an interactive lambda, or a single sexp (it will be
@@ -862,18 +862,16 @@ printed beside KEY in the echo erea if `hydra-is-helpful'
is not
nil. If you don't even want the KEY to be printed, set HINT
explicitly to nil.
-The heads inherit their PLIST from the body and are allowed to
-override each key. The keys recognized are :color and :bind.
-:color can be:
+The heads inherit their PLIST from BODY-PLIST and are allowed to
+override some keys. The keys recognized are :exit and :bind.
+:exit can be:
-- red (default): this head will continue the Hydra state.
-- blue: this head will stop the Hydra state.
-- amaranth (applies to body only): similar to red, but no binding
-except a blue head can stop the Hydra state.
+- nil (default): this head will continue the Hydra state.
+- t: this head will stop the Hydra state.
:bind can be:
- nil: this head will not be bound in BODY-MAP.
-- a lambda taking KEY and CMD used to bind a head
+- a lambda taking KEY and CMD used to bind a head.
It is possible to omit both BODY-MAP and BODY-KEY if you don't
want to bind anything. In that case, typically you will bind the
- [elpa] master 87e4574 05/18: Mention the leading newline in `defhydra' docstring, (continued)
- [elpa] master 87e4574 05/18: Mention the leading newline in `defhydra' docstring, Oleh Krehel, 2015/03/28
- [elpa] master 71491b9 04/18: Fix argument to `replace-match', Oleh Krehel, 2015/03/28
- [elpa] master f6697f3 02/18: Allow for the "%s`foo" spec., Oleh Krehel, 2015/03/28
- [elpa] master 5c3ab46 08/18: hydra.el (hydra--format): Amend regex, Oleh Krehel, 2015/03/28
- [elpa] master 1bad0c4 09/18: hydra.el (hydra--format): Update regex order, Oleh Krehel, 2015/03/28
- [elpa] master 03771f4 01/18: hydra.el: Turn on lexical-binding, Oleh Krehel, 2015/03/28
- [elpa] master fe1cfee 10/18: hydra-examples.el (hydra-rectangle): Update, Oleh Krehel, 2015/03/28
- [elpa] master c8c6b8c 03/18: Fix blue/red heads with same cmd, Oleh Krehel, 2015/03/28
- [elpa] master 1290237 12/18: Disable key-chord for the duration of the hydra, Oleh Krehel, 2015/03/28
- [elpa] master cb4b78a 11/18: hydra-test.el (hydra-format-4): Add test, Oleh Krehel, 2015/03/28
- [elpa] master 640af46 13/18: hydra.el (defhydra): Improve docstring,
Oleh Krehel <=
- [elpa] master 7843563 14/18: hydra.el (hydra--make-funcall): Add, Oleh Krehel, 2015/03/28
- [elpa] master e403363 16/18: hydra.el (defhydra): Avoid eager macroexpansion failure, Oleh Krehel, 2015/03/28
- [elpa] master 5032ec7 15/18: hydra.el (defhydra): Simplify and improve the key binding code, Oleh Krehel, 2015/03/28
- [elpa] master 4a6a31d 17/18: hydra.el: Bump version, Oleh Krehel, 2015/03/28
- [elpa] master da45e68 18/18: Merge commit '4a6a31d6d4d479720f4b66091892b0cda2377346' from hydra, Oleh Krehel, 2015/03/28