[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 69529ad 01/36: hydra.el (hydra-default-hint): Add option
From: |
Oleh Krehel |
Subject: |
[elpa] master 69529ad 01/36: hydra.el (hydra-default-hint): Add option |
Date: |
Sat, 22 Jul 2017 11:22:19 -0400 (EDT) |
branch: master
commit 69529aded3009ab663b276db8f2e484d39c4ca81
Author: justbur <address@hidden>
Commit: justbur <address@hidden>
hydra.el (hydra-default-hint): Add option
---
hydra.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/hydra.el b/hydra.el
index 0acd578..1260463 100644
--- a/hydra.el
+++ b/hydra.el
@@ -193,6 +193,12 @@ warn: keep KEYMAP and issue a warning instead of running
the command."
:type 'boolean
:group 'hydra)
+(defcustom hydra-default-hint ""
+ "Default :hint property to use for heads when not specified in
+the body or the head."
+ :type 'sexp
+ :group 'hydra)
+
(defcustom hydra-lv t
"When non-nil, `lv-message' (not `message') will be used to display hints."
:type 'boolean)
@@ -975,7 +981,8 @@ result of `defhydra'."
((= len 2)
(setcdr (cdr h)
(list
- (hydra-plist-get-default body-plist :hint "")))
+ (hydra-plist-get-default
+ body-plist :hint hydra-default-hint)))
(setcdr (nthcdr 2 h) (list :exit body-exit)))
(t
(let ((hint (cl-caddr h)))
@@ -983,7 +990,8 @@ result of `defhydra'."
(stringp hint)
(stringp (eval hint)))
(setcdr (cdr h) (cons
- (hydra-plist-get-default body-plist
:hint "")
+ (hydra-plist-get-default
+ body-plist :hint hydra-default-hint)
(cddr h)))))
(let ((hint-and-plist (cddr h)))
(if (null (cdr hint-and-plist))
- [elpa] master updated (231ac7f -> 32b8352), Oleh Krehel, 2017/07/22
- [elpa] master 69529ad 01/36: hydra.el (hydra-default-hint): Add option,
Oleh Krehel <=
- [elpa] master f01f4a4 04/36: hydra.el (hydra-key-regex): Extract from hydra--format, Oleh Krehel, 2017/07/22
- [elpa] master 83b9019 07/36: hydra.el (hydra-width-spec-regex): Update, Oleh Krehel, 2017/07/22
- [elpa] master 9fd53ba 08/36: hydra.el (hydra-doc-format-spec): New defcustom, Oleh Krehel, 2017/07/22
- [elpa] master f668f4c 06/36: hydra.el (hydra-key-regex): Add "↓←→⌫⌦⏎", Oleh Krehel, 2017/07/22
- [elpa] master f877855 12/36: hydra-examples.el (org-agenda-cts): Add, Oleh Krehel, 2017/07/22
- [elpa] master 0a5074a 09/36: hydra.el (hydra--format): Avoid inf loops, Oleh Krehel, 2017/07/22
- [elpa] master 270b917 14/36: hydra.el (defhydra): Don't eval hints during the definition, Oleh Krehel, 2017/07/22
- [elpa] master 200a444 10/36: hydra.el (hydra--hint): Revert return "" for :hint nil, Oleh Krehel, 2017/07/22
- [elpa] master 798684a 13/36: hydra-examples.el: Don't byte-compile, Oleh Krehel, 2017/07/22
- [elpa] master 1eee0f3 18/36: hydra.el (hydra-get-property): New defun., Oleh Krehel, 2017/07/22