* hydra.el (hydra--hint): Forward to `hydra-fontify-head'.
(hydra-fontify-head-function): New defvar.
(hydra-fontify-head-default): New defun that represents the classic
fontification behavior.
(hydra-fontify-head): Fontification dispatch - use
`hydra-fontify-head-default'
unless `hydra-fontify-head-function' is set.
(hydra--format): Forward to `hydra-fontify-head'.
Example:
(setq hydra-fontify-head-function
(lambda (head body)
(let ((color (hydra--head-color head body)))
(format
(if (eq color 'blue)
"[%s]"
"{%s}") (car head)))))
Call `defhydra' here, then reset:
(setq hydra-fontify-head-function nil)
Call another `defhydra' here.
master
parent
a4c4eb6acb
commit
0f733d8efc
1 changed files with 15 additions and 3 deletions
Loading…
Reference in new issue