Function: Info-copy-current-node-name
Info-copy-current-node-name is an interactive and byte-compiled
function defined in info.el.gz.
Signature
(Info-copy-current-node-name &optional ARG)
Documentation
Put the name of the current Info node into the kill ring.
The name of the Info file is prepended to the node name in parentheses.
With a zero prefix arg, put the name inside a function call to info.
Probably introduced at or before Emacs version 22.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/info.el.gz
(defun Info-copy-current-node-name (&optional arg)
"Put the name of the current Info node into the kill ring.
The name of the Info file is prepended to the node name in parentheses.
With a zero prefix arg, put the name inside a function call to `info'."
(interactive "P" Info-mode)
(unless Info-current-node
(user-error "No current Info node"))
(let ((node (if (stringp Info-current-file)
(concat "(" (file-name-sans-extension
(file-name-nondirectory Info-current-file))
") "
Info-current-node))))
(if (zerop (prefix-numeric-value arg))
(setq node (concat "(info \"" node "\")")))
(unless (stringp Info-current-file)
(setq node (format "(Info-find-node '%S '%S)"
Info-current-file Info-current-node)))
(kill-new node)
(message "%s" node)))