]> code.delx.au - gnu-emacs-elpa/commitdiff
hydra.el (hydra-fontify-head-default): Fixup
authorOleh Krehel <ohwoeowho@gmail.com>
Thu, 30 Apr 2015 08:18:56 +0000 (10:18 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Thu, 30 Apr 2015 08:18:56 +0000 (10:18 +0200)
* hydra.el (hydra-fontify-head-default): Use head-exit. The heads have
  been pre-processed to have it always set.

* hydra-test.el (hydra-format-4): Update test. The heads are passed to
  `hydra--format' in the pre-processed state now (color and hint expanded).

hydra-test.el
hydra.el

index 1c1ab2bf5b98d2bd37b51429f236919e716c20a2..0fc82a19dbed006d107fd08f44e02bcccf681fa4 100644 (file)
@@ -1040,7 +1040,7 @@ _f_ auto-fill-mode:    %`auto-fill-function
            nil
            '(nil nil :hint nil)
            "\n_j_,_k_"
-           '(("j" nil) ("k" nil)))
+           '(("j" nil nil :exit t) ("k" nil nil :exit t)))
           '(concat (format "%s,%s"
                     #("j" 0 1 (face hydra-face-blue))
                     #("k" 0 1 (face hydra-face-blue))) ""))))
index edc24a2edfde638772309b73e38836fca9cab57b..33ba508e958b4c94258b4e77d7171e4c5df67bc5 100644 (file)
--- a/hydra.el
+++ b/hydra.el
@@ -441,7 +441,7 @@ HEAD's binding is returned as a string with a colored face."
               (run 'pink)
               (t 'red)))))
     (when (and (null (cadr head))
-               (not (eq head-color 'blue)))
+               (not head-exit))
       (hydra--complain "nil cmd can only be blue"))
     (propertize (car head) 'face
                 (cl-case head-color