emacs-elpa-diffs
[Top][All Lists]
Advanced

[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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]