Function: Info-goto-emacs-key-command-node

Info-goto-emacs-key-command-node is an autoloaded, interactive and byte-compiled function defined in info.el.gz.

Signature

(Info-goto-emacs-key-command-node KEY)

Documentation

Go to the node in the Emacs manual which describes the command bound to KEY.

KEY is a string. Interactively, if the binding is execute-extended-command, a command is read. The command is found by looking up in Emacs manual's indices or in another manual found via COMMAND's info-file property or the variable Info-file-list-for-emacs.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/info.el.gz
;;;###autoload (put 'Info-goto-emacs-key-command-node 'info-file "emacs")
;;;###autoload
(defun Info-goto-emacs-key-command-node (key)
  "Go to the node in the Emacs manual which describes the command bound to KEY.
KEY is a string.
Interactively, if the binding is `execute-extended-command', a command is read.
The command is found by looking up in Emacs manual's indices
or in another manual found via COMMAND's `info-file' property or
the variable `Info-file-list-for-emacs'."
  (interactive
   (let ((enable-disabled-menus-and-buttons t)
         (cursor-in-echo-area t)
         ;; Showing the list of key sequences makes no sense when they
         ;; asked about a key sequence.
         (echo-keystrokes-help nil)
         (prompt (propertize "Find documentation for key: "
                              'face 'minibuffer-prompt)))
     (list (read-key-sequence prompt nil nil 'can-return-switch-frame))))
  (let ((command (key-binding key)))
    (cond ((null command)
	   (message "%s is undefined" (key-description key)))
	  ((and (called-interactively-p 'interactive)
		(eq command 'execute-extended-command))
	   (Info-goto-emacs-command-node
	    (read-command "Find documentation for command: ")))
          ((symbolp command)
           (Info-goto-emacs-command-node command))
	  (t
	   (message
            (substitute-command-keys
             (format
              "\\`%s' invokes an anonymous command defined with `lambda'"
              (key-description key))))))))