diff options
| author | Kim F. Storm | 2002-02-06 23:05:03 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2002-02-06 23:05:03 +0000 |
| commit | d2ab11c5a7f07613269d07e8054218b159256251 (patch) | |
| tree | f75f045d1e543277785732c4a4d4505b4184f1a2 | |
| parent | 290bfb6617e1c99856bbe434297ab99d127c5b02 (diff) | |
| download | emacs-d2ab11c5a7f07613269d07e8054218b159256251.tar.gz emacs-d2ab11c5a7f07613269d07e8054218b159256251.zip | |
(describe-function-1): Report remapped commands.
| -rw-r--r-- | lisp/help-fns.el | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index a158ddf64fe..20d76f9c913 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -207,12 +207,20 @@ and the file name is displayed in the echo area." | |||
| 207 | (princ ".") | 207 | (princ ".") |
| 208 | (terpri) | 208 | (terpri) |
| 209 | (when (commandp function) | 209 | (when (commandp function) |
| 210 | (let ((keys (where-is-internal | 210 | (let* ((binding (and (symbolp function) (commandp function) |
| 211 | function overriding-local-map nil nil))) | 211 | (key-binding function nil t))) |
| 212 | (remapped (and (symbolp binding) (commandp binding) binding)) | ||
| 213 | (keys (where-is-internal | ||
| 214 | (or remapped function) overriding-local-map nil nil))) | ||
| 215 | (when remapped | ||
| 216 | (princ "It is remapped to `") | ||
| 217 | (princ (symbol-name remapped)) | ||
| 218 | (princ "'")) | ||
| 212 | (when keys | 219 | (when keys |
| 213 | (princ "It is bound to ") | 220 | (princ (if remapped " which is bound to " "It is bound to ")) |
| 214 | ;; FIXME: This list can be very long (f.ex. for self-insert-command). | 221 | ;; FIXME: This list can be very long (f.ex. for self-insert-command). |
| 215 | (princ (mapconcat 'key-description keys ", ")) | 222 | (princ (mapconcat 'key-description keys ", "))) |
| 223 | (when (or remapped keys) | ||
| 216 | (princ ".") | 224 | (princ ".") |
| 217 | (terpri)))) | 225 | (terpri)))) |
| 218 | ;; Handle symbols aliased to other symbols. | 226 | ;; Handle symbols aliased to other symbols. |