[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 42cb833 21/72: hydra.el (hydra--hint): Take same arguments
From: |
Oleh Krehel |
Subject: |
[elpa] master 42cb833 21/72: hydra.el (hydra--hint): Take same arguments as `defhydra' |
Date: |
Fri, 06 Mar 2015 13:04:07 +0000 |
branch: master
commit 42cb833d5a9219dbcdef1f88c639f32535257cef
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
hydra.el (hydra--hint): Take same arguments as `defhydra'
---
hydra.el | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hydra.el b/hydra.el
index 83c05d0..dbf3cf2 100644
--- a/hydra.el
+++ b/hydra.el
@@ -303,12 +303,14 @@ NAME, BODY, DOCSTRING and HEADS are parameters to
`defhydra'."
(nreverse (mapcar #'cdr alist))
", "))))
-(defun hydra--format (str name heads body-color)
+(defun hydra--format (name body docstring heads)
"Generate a `format' statement from STR.
\"%`...\" expressions are extracted into \"%S\".
NAME, HEADS and BODY-COLOR are parameters of `defhydra'.
The expressions can be auto-expanded according to NAME."
- (let ((prefix (symbol-name name))
+ (let ((str (hydra--hint name body docstring heads))
+ (body-color (hydra--body-color body))
+ (prefix (symbol-name name))
(start 0)
varlist)
(while (setq start (string-match "%`\\([a-z-A-Z/0-9]+\\)" str start))
@@ -329,9 +331,7 @@ The expressions can be auto-expanded according to NAME."
"Generate code to display the hint in the preferred echo area.
Set `hydra-lv' to choose the echo area.
NAME, BODY, DOCSTRING, and HEADS are parameters of `defhydra'."
- (let* ((body-color (hydra--body-color body))
- (format-expr (hydra--format
- (hydra--hint name body docstring heads) name heads
body-color)))
+ (let ((format-expr (hydra--format name body docstring heads)))
`(if hydra-lv
(lv-message ,format-expr)
(message ,format-expr))))
- [elpa] master c049a33 16/72: Allow for Ruby-style Hydra docstrings, (continued)
- [elpa] master c049a33 16/72: Allow for Ruby-style Hydra docstrings, Oleh Krehel, 2015/03/06
- [elpa] master 688e8fd 23/72: hydra.el (hydra--head-color): fix for teal color, Oleh Krehel, 2015/03/06
- [elpa] master 0cda4ce 26/72: Fix typos, Oleh Krehel, 2015/03/06
- [elpa] master caf114a 11/72: Fix unintentional recursion in Emacs 25, Oleh Krehel, 2015/03/06
- [elpa] master c7281e9 17/72: Minor refactoring, Oleh Krehel, 2015/03/06
- [elpa] master 06b35f7 08/72: Remove obsoletes, Oleh Krehel, 2015/03/06
- [elpa] master 806e04b 09/72: Don't clutter Echo Area, Oleh Krehel, 2015/03/06
- [elpa] master 4f0ef62 27/72: hydra.el (hydra-pink-fallback): Add, Oleh Krehel, 2015/03/06
- [elpa] master 4aa8826 18/72: hydra.el (hydra--message): Take same arguments as `defhydra', Oleh Krehel, 2015/03/06
- [elpa] master b81d078 29/72: Generate a global resetter in `defhydradio', Oleh Krehel, 2015/03/06
- [elpa] master 42cb833 21/72: hydra.el (hydra--hint): Take same arguments as `defhydra',
Oleh Krehel <=
- [elpa] master 0a3cc60 30/72: Add compat color-less syntax, Oleh Krehel, 2015/03/06
- [elpa] master 92e1922 19/72: hydra.el (hydra--hint): Take same arguments as `defhydra', Oleh Krehel, 2015/03/06
- [elpa] master 6f7cef2 22/72: Add teal body color, Oleh Krehel, 2015/03/06
- [elpa] master 7010772 32/72: hydra.el (hydra--head-color): Improve, Oleh Krehel, 2015/03/06
- [elpa] master d0e8d57 33/72: hydra.el (hydra-add-font-lock): Add `defhydradio', Oleh Krehel, 2015/03/06
- [elpa] master 0881733 28/72: hydra.el (defhydra): Fix typo, Oleh Krehel, 2015/03/06
- [elpa] master a4c4eb6 36/72: Add example for `Buffer-menu-mode', Oleh Krehel, 2015/03/06
- [elpa] master 88b32d5 24/72: hydra.el (hydra--hint): Add exception, Oleh Krehel, 2015/03/06
- [elpa] master c41c932 31/72: README.md: fix tables, Oleh Krehel, 2015/03/06
- [elpa] master 1eebfed 34/72: Allow `format'-style width specifiers in docstring, Oleh Krehel, 2015/03/06