diff options
| author | Kim F. Storm | 2002-02-23 22:31:02 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2002-02-23 22:31:02 +0000 |
| commit | 962ffad8d7ac24e95703d6b298d270d2d02d0e03 (patch) | |
| tree | 5e35931a3bd774328e9580b89e24f54c8ef561db /lisp | |
| parent | 1d6a83230c4cb43d14b0de5cfae34ddd45ad62e8 (diff) | |
| download | emacs-962ffad8d7ac24e95703d6b298d270d2d02d0e03.tar.gz emacs-962ffad8d7ac24e95703d6b298d270d2d02d0e03.zip | |
(where-is): Use remap-command.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/help.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/help.el b/lisp/help.el index 82afa023f22..fe7782d276a 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -412,21 +412,19 @@ If INSERT (the prefix arg) is non-nil, insert the message in the buffer." | |||
| 412 | (list (if (equal val "") | 412 | (list (if (equal val "") |
| 413 | fn (intern val)) | 413 | fn (intern val)) |
| 414 | current-prefix-arg))) | 414 | current-prefix-arg))) |
| 415 | (let* ((binding (and (symbolp definition) (commandp definition) | 415 | (let* ((remapped (remap-command definition)) |
| 416 | (key-binding definition nil t))) | 416 | (keys (where-is-internal definition overriding-local-map nil nil remapped)) |
| 417 | (remap (and (symbolp binding) (commandp binding) binding)) | ||
| 418 | (keys (where-is-internal definition overriding-local-map nil nil remap)) | ||
| 419 | (keys1 (mapconcat 'key-description keys ", ")) | 417 | (keys1 (mapconcat 'key-description keys ", ")) |
| 420 | (standard-output (if insert (current-buffer) t))) | 418 | (standard-output (if insert (current-buffer) t))) |
| 421 | (if insert | 419 | (if insert |
| 422 | (if (> (length keys1) 0) | 420 | (if (> (length keys1) 0) |
| 423 | (if remap | 421 | (if remapped |
| 424 | (princ (format "%s (%s) (remapped from %s)" keys1 remap definition)) | 422 | (princ (format "%s (%s) (remapped from %s)" keys1 remapped definition)) |
| 425 | (princ (format "%s (%s)" keys1 definition))) | 423 | (princ (format "%s (%s)" keys1 definition))) |
| 426 | (princ (format "M-x %s RET" definition))) | 424 | (princ (format "M-x %s RET" definition))) |
| 427 | (if (> (length keys1) 0) | 425 | (if (> (length keys1) 0) |
| 428 | (if remap | 426 | (if remapped |
| 429 | (princ (format "%s is remapped to %s which is on %s" definition remap keys1)) | 427 | (princ (format "%s is remapped to %s which is on %s" definition remapped keys1)) |
| 430 | (princ (format "%s is on %s" definition keys1))) | 428 | (princ (format "%s is on %s" definition keys1))) |
| 431 | (princ (format "%s is not on any key" definition))))) | 429 | (princ (format "%s is not on any key" definition))))) |
| 432 | nil) | 430 | nil) |