Function: shortdoc-copy-function-as-kill
shortdoc-copy-function-as-kill is an interactive and byte-compiled
function defined in shortdoc.el.gz.
Signature
(shortdoc-copy-function-as-kill)
Documentation
Copy name of the function near point into the kill ring.
Probably introduced at or before Emacs version 29.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/shortdoc.el.gz
(defun shortdoc-copy-function-as-kill ()
"Copy name of the function near point into the kill ring."
(interactive)
(save-excursion
(goto-char (pos-bol))
(when-let* ((re (rx bol "(" (group (+ (not (in " )"))))))
(string
(and (or (looking-at re)
(re-search-backward re nil t))
(match-string 1))))
(set-text-properties 0 (length string) nil string)
(kill-new string)
(message string))))