branch: master commit 71491b940f0ea6ab2d311aeabe83a3af4a4f4dc8 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
Fix argument to `replace-match' * hydra.el (hydra--format): Update. * hydra-test.el (hydra-format-3): Add test. Fixes #91 --- hydra-test.el | 11 +++++++++++ hydra.el | 2 +- 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/hydra-test.el b/hydra-test.el index c82b559..06aa77a 100644 --- a/hydra-test.el +++ b/hydra-test.el @@ -740,6 +740,17 @@ _f_ auto-fill-mode: %`auto-fill-function ("q" nil "" :cmd-name bar/nil)))) '(concat (format " bar %s\n" foo) "{a}, [q]")))) +(ert-deftest hydra-format-3 () + (should (equal + (let ((hydra-fontify-head-function + 'hydra-fontify-head-greyscale)) + (hydra--format + 'bar + nil + "\n_<SPC>_ ^^ace jump\n" + '(("<SPC>" ace-jump-char-mode nil :cmd-name bar/ace-jump-char-mode)))) + '(concat (format "%s ace jump\n" "{<SPC>}") "")))) + (ert-deftest hydra-format-with-sexp-1 () (should (equal (let ((hydra-fontify-head-function diff --git a/hydra.el b/hydra.el index 1b8dbb6..f4f30b9 100644 --- a/hydra.el +++ b/hydra.el @@ -491,7 +491,7 @@ The expressions can be auto-expanded according to NAME." (or hydra-key-format-spec (concat "%" (match-string 3 docstring) "s")) - nil nil docstring))) + t nil docstring))) (error "Unrecognized key: _%s_" key)))) (t