Function: hydra--doc
hydra--doc is a byte-compiled function defined in hydra.el.
Signature
(hydra--doc BODY-KEY BODY-NAME HEADS)
Documentation
Generate a part of Hydra docstring.
BODY-KEY is the body key binding. BODY-NAME is the symbol that identifies the Hydra. HEADS is a list of heads.
Source Code
;; Defined in ~/.emacs.d/elpa/hydra-20250316.1254/hydra.el
(defun hydra--doc (body-key body-name heads)
"Generate a part of Hydra docstring.
BODY-KEY is the body key binding.
BODY-NAME is the symbol that identifies the Hydra.
HEADS is a list of heads."
(format
"The heads for the associated hydra are:\n\n%s\n\n%s%s."
(mapconcat
(lambda (x)
(format "\"%s\": %s"
(car x)
(if (cadr x) (format "`%S'" (cadr x)) "nil")))
heads ",\n")
(format "The body can be accessed via `%S'" body-name)
(if body-key
(format ", which is bound to \"%s\"" body-key)
"")))