[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 87e4574 05/18: Mention the leading newline in `defhydra' d
From: |
Oleh Krehel |
Subject: |
[elpa] master 87e4574 05/18: Mention the leading newline in `defhydra' docstring |
Date: |
Sat, 28 Mar 2015 15:04:24 +0000 |
branch: master
commit 87e4574f178f770e00cef42ddaf82abadc37027a
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Mention the leading newline in `defhydra' docstring
* hydra.el (hydra--handle-switch-frame): Update doc.
(hydra--format): Update doc.
(hydra-timeout): Update doc.
(defhydra): Update doc.
(defhydradio): Update doc.
Fixes #88.
---
hydra.el | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/hydra.el b/hydra.el
index f4f30b9..4090390 100644
--- a/hydra.el
+++ b/hydra.el
@@ -197,7 +197,7 @@ Vanquishable only through a blue head.")
"Keymap of the current Hydra called.")
(defun hydra--handle-switch-frame (evt)
- "Quit hydra and call old switch-frame event handler."
+ "Quit hydra and call old switch-frame event handler for EVT."
(interactive "e")
(hydra-keyboard-quit)
(funcall (lookup-key (current-global-map) [switch-frame]) evt))
@@ -469,7 +469,7 @@ HEAD's binding is returned as a string wrapped with [] or
{}."
(defun hydra--format (_name body docstring heads)
"Generate a `format' statement from STR.
\"%`...\" expressions are extracted into \"%S\".
-NAME, BODY, DOCSTRING and HEADS are parameters of `defhydra'.
+_NAME, BODY, DOCSTRING and HEADS are parameters of `defhydra'.
The expressions can be auto-expanded according to NAME."
(setq docstring (replace-regexp-in-string "\\^" "" docstring))
(let ((rest (hydra--hint body heads))
@@ -794,7 +794,7 @@ NAMES should be defined by `defhydradio' or similar."
"Timer for `hydra-timeout'.")
(defun hydra-timeout (secs &optional function)
- "In SECS seconds call FUNCTION, then `hydra-keyboard-quit'.
+ "In SECS seconds call FUNCTION, then function `hydra-keyboard-quit'.
Cancel the previous `hydra-timeout'."
(cancel-timer hydra-timer)
(setq hydra-timer (timer-create))
@@ -822,7 +822,8 @@ BODY has the format:
(BODY-MAP BODY-KEY &rest PLIST)
DOCSTRING will be displayed in the echo area to identify the
-Hydra.
+Hydra. When DOCSTRING starts with a newline, special Ruby-style
+substitution will be performed by `hydra--format'.
Functions are created on basis of HEADS, each of which has the
format:
@@ -969,7 +970,7 @@ result of `defhydra'."
(defmacro defhydradio (name _body &rest heads)
"Create radios with prefix NAME.
-BODY specifies the options; there are none currently.
+_BODY specifies the options; there are none currently.
HEADS have the format:
(TOGGLE-NAME &optional VALUE DOC)
- [elpa] master updated (059c3d5 -> da45e68), Oleh Krehel, 2015/03/28
- [elpa] master 84f4fe7 06/18: Don't default `hydra-repeat--prefix-arg' to 1, Oleh Krehel, 2015/03/28
- [elpa] master 6c6fc0b 07/18: Allow `hydra-repeat' to take a numeric arg, Oleh Krehel, 2015/03/28
- [elpa] master 87e4574 05/18: Mention the leading newline in `defhydra' docstring,
Oleh Krehel <=
- [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, 2015/03/28