# HG changeset patch # User Kim F. Storm # Date 1013036703 0 # Node ID c72ba425c03852ae800630902c893c23e830ea41 # Parent 05398ea6cb3214010013ba3a5c5bb7c01f440457 (describe-function-1): Report remapped commands. diff -r 05398ea6cb32 -r c72ba425c038 lisp/help-fns.el --- a/lisp/help-fns.el Wed Feb 06 23:03:56 2002 +0000 +++ b/lisp/help-fns.el Wed Feb 06 23:05:03 2002 +0000 @@ -207,12 +207,20 @@ (princ ".") (terpri) (when (commandp function) - (let ((keys (where-is-internal - function overriding-local-map nil nil))) + (let* ((binding (and (symbolp function) (commandp function) + (key-binding function nil t))) + (remapped (and (symbolp binding) (commandp binding) binding)) + (keys (where-is-internal + (or remapped function) overriding-local-map nil nil))) + (when remapped + (princ "It is remapped to `") + (princ (symbol-name remapped)) + (princ "'")) (when keys - (princ "It is bound to ") + (princ (if remapped " which is bound to " "It is bound to ")) ;; FIXME: This list can be very long (f.ex. for self-insert-command). - (princ (mapconcat 'key-description keys ", ")) + (princ (mapconcat 'key-description keys ", "))) + (when (or remapped keys) (princ ".") (terpri)))) ;; Handle symbols aliased to other symbols.