[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 688e8fd 23/72: hydra.el (hydra--head-color): fix for teal

From: Oleh Krehel
Subject: [elpa] master 688e8fd 23/72: hydra.el (hydra--head-color): fix for teal color
Date: Fri, 06 Mar 2015 13:04:08 +0000

branch: master
commit 688e8fdc06ebaf824f91723da8d30c01f20215de
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    hydra.el (hydra--head-color): fix for teal color
 hydra.el |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/hydra.el b/hydra.el
index cfebf5e..a944723 100644
--- a/hydra.el
+++ b/hydra.el
@@ -225,9 +225,13 @@ Return DEFAULT if PROP is not in H."
 (defun hydra--head-color (h body-color)
   "Return the color of a Hydra head H with BODY-COLOR."
-  (if (null (cadr h))
-      'blue
-    (or (hydra--head-property h :color) body-color)))
+  (let ((col (hydra--head-property h :color)))
+    (cond ((null (cadr h))
+           'blue)
+          ((null col)
+           body-color)
+          (t
+           col))))
 (defun hydra--body-color (body)
   "Return the color of BODY.
@@ -369,10 +373,10 @@ BODY-COLOR, BODY-PRE, BODY-POST, and OTHER-POST are used 
as well."
      ,@(when body-pre (list body-pre))
-     ,@(when (eq color 'blue) '((hydra-cleanup)))
+     ,@(when (memq color '(blue teal)) '((hydra-cleanup)))
      (catch 'hydra-disable
        ,@(delq nil
-               (if (eq color 'blue)
+               (if (memq color '(blue teal))
                    `(,(when cmd `(call-interactively #',cmd))
                  `(,(when cmd

reply via email to

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