]> code.delx.au - gnu-emacs-elpa/commitdiff
hydra.el (hydra--face): Remove
authorOleh Krehel <ohwoeowho@gmail.com>
Sun, 12 Apr 2015 11:36:25 +0000 (13:36 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Sun, 12 Apr 2015 11:36:25 +0000 (13:36 +0200)
* hydra.el (hydra-fontify-head-default): Update.

hydra.el

index 66a8f26a115883f6038cb9f7090e3e86073f5a41..e5152c08def35a10607911817bcf6bfeab3e8dae 100644 (file)
--- a/hydra.el
+++ b/hydra.el
@@ -385,16 +385,6 @@ BODY is the second argument to `defhydra'"
           (color color)
           (t 'red))))
 
-(defun hydra--face (h body)
-  "Return the face for a Hydra head H with BODY."
-  (cl-case (hydra--head-color h body)
-    (blue 'hydra-face-blue)
-    (red 'hydra-face-red)
-    (amaranth 'hydra-face-amaranth)
-    (pink 'hydra-face-pink)
-    (teal 'hydra-face-teal)
-    (t (error "Unknown color for %S" h))))
-
 (defvar hydra--input-method-function nil
   "Store overridden `input-method-function' here.")
 
@@ -452,7 +442,14 @@ BODY, and HEADS are parameters to `defhydra'."
 (defun hydra-fontify-head-default (head body)
   "Produce a pretty string from HEAD and BODY.
 HEAD's binding is returned as a string with a colored face."
-  (propertize (car head) 'face (hydra--face head body)))
+  (propertize (car head) 'face
+              (cl-case (hydra--head-color head body)
+                (blue 'hydra-face-blue)
+                (red 'hydra-face-red)
+                (amaranth 'hydra-face-amaranth)
+                (pink 'hydra-face-pink)
+                (teal 'hydra-face-teal)
+                (t (error "Unknown color for %S" head)))))
 
 (defun hydra-fontify-head-greyscale (head body)
   "Produce a pretty string from HEAD and BODY.