Function: embark--function-doc
embark--function-doc is a byte-compiled function defined in embark.el.
Signature
(embark--function-doc SYM)
Documentation
Documentation string of function SYM.
Source Code
;; Defined in ~/.emacs.d/elpa/embark-20260610.302/embark.el
;; Taken from Marginalia, needed by the verbose indicator.
;; We cannot use the completion annotators in this case.
(defun embark--function-doc (sym)
"Documentation string of function SYM."
(let ((vstr (and (symbolp sym) (keymapp sym) (boundp sym)
(eq (symbol-function sym) (symbol-value sym))
(documentation-property sym 'variable-documentation))))
(when-let* ((str (or (ignore-errors (documentation sym)) vstr)))
;; Replace standard description with variable documentation
(when (and vstr (string-match-p "\\`Prefix command" str))
(setq str vstr))
(save-match-data
(if (string-match embark--advice-regexp str)
(substring str (match-end 0))
str)))))