Function: hydra--hint
hydra--hint is a byte-compiled function defined in hydra.el.
Signature
(hydra--hint BODY HEADS)
Documentation
Generate a hint for the echo area.
BODY, and HEADS are parameters to defhydra.
Source Code
;; Defined in ~/.emacs.d/elpa/hydra-20250316.1254/hydra.el
(defun hydra--hint (body heads)
"Generate a hint for the echo area.
BODY, and HEADS are parameters to `defhydra'."
(let* ((sorted-heads (hydra--sort-heads (hydra--normalize-heads heads)))
(heads-w-col (cl-remove-if-not (lambda (heads) (hydra--head-property (nth 0 heads) :column)) sorted-heads))
(heads-wo-col (cl-remove-if (lambda (heads) (hydra--head-property (nth 0 heads) :column)) sorted-heads))
(hint-w-col (when heads-w-col
(hydra--hint-from-matrix body (hydra--generate-matrix heads-w-col))))
(hint-wo-col (when heads-wo-col
(hydra--hint-heads-wocol body (car heads-wo-col)))))
(if (null hint-w-col)
hint-wo-col
(if (stringp hint-wo-col)
`(concat ,@hint-w-col ,hint-wo-col)
`(concat ,@hint-w-col ,@(cdr hint-wo-col))))))