branch: master commit 4aa8826d165925dbe25bba513fbe747ae52048ad Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
hydra.el (hydra--message): Take same arguments as `defhydra' --- hydra.el | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hydra.el b/hydra.el index 6c54902..3f547c5 100644 --- a/hydra.el +++ b/hydra.el @@ -323,11 +323,13 @@ The expressions can be auto-expanded according to NAME." (error "Unrecognized key: _%s_" key)))) `(format ,str ,@(nreverse varlist)))) -(defun hydra--message (str name heads body-color) +(defun hydra--message (name body docstring heads) "Generate code to display STR in the preferred echo area. Set `hydra-lv' to choose the echo area. NAME, HEADS and BODY-COLOR are parameters of `defhydra'." - (let ((format-expr (hydra--format (hydra--hint str heads body-color) name heads body-color))) + (let* ((body-color (hydra--body-color body)) + (format-expr (hydra--format + (hydra--hint docstring heads body-color) name heads body-color))) `(if hydra-lv (lv-message ,format-expr) (message ,format-expr)))) @@ -551,7 +553,7 @@ result of `defhydra'." (error "Invalid :bind property %S" head)))))) heads names)) (defun ,hint-name () - ,(hydra--message docstring name heads body-color)) + ,(hydra--message name body docstring heads)) ,(hydra--make-defun body-name nil nil doc hint-name keymap body-color body-pre body-post '(setq prefix-arg current-prefix-arg)))))