summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2002-02-06 23:03:56 +0000
committerKim F. Storm <storm@cua.dk>2002-02-06 23:03:56 +0000
commit290bfb6617e1c99856bbe434297ab99d127c5b02 (patch)
tree26d93e4637f9086441e0662711c2f01da4865d37 /lisp/help.el
parent4857ef585749556bc4ce2bc4082ffb089582042c (diff)
downloademacs-290bfb6617e1c99856bbe434297ab99d127c5b02.tar.gz
(where-is): Report remapped commands.
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 8b96b2a0b52..70951e021b9 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -412,15 +412,22 @@ If INSERT (the prefix arg) is non-nil, insert the message in the buffer."
(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)