Mercurial > emacs
changeset 43156:05398ea6cb32
(where-is): Report remapped commands.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Wed, 06 Feb 2002 23:03:56 +0000 |
parents | 5943cc278b4c |
children | c72ba425c038 |
files | lisp/help.el |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/help.el Wed Feb 06 23:00:52 2002 +0000 +++ b/lisp/help.el Wed Feb 06 23:03:56 2002 +0000 @@ -412,15 +412,22 @@ (list (if (equal val "") fn (intern val)) current-prefix-arg))) - (let* ((keys (where-is-internal definition overriding-local-map nil nil)) + (let* ((binding (and (symbolp definition) (commandp definition) + (key-binding definition nil t))) + (remap (and (symbolp binding) (commandp binding) binding)) + (keys (where-is-internal definition overriding-local-map nil nil remap)) (keys1 (mapconcat 'key-description keys ", ")) (standard-output (if insert (current-buffer) t))) (if insert (if (> (length keys1) 0) - (princ (format "%s (%s)" keys1 definition)) + (if remap + (princ (format "%s (%s) (remapped from %s)" keys1 remap definition)) + (princ (format "%s (%s)" keys1 definition))) (princ (format "M-x %s RET" definition))) (if (> (length keys1) 0) - (princ (format "%s is on %s" definition keys1)) + (if remap + (princ (format "%s is remapped to %s which is on %s" definition remap keys1)) + (princ (format "%s is on %s" definition keys1))) (princ (format "%s is not on any key" definition))))) nil)