diff --git a/lisp/simple.el b/lisp/simple.el index bb28145502..2acceef6a1 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1964,13 +1964,14 @@ read-extended-command #'commandp t nil 'extended-command-history))) (defun read-extended-command--annotation (command-name) - (let* ((fun (and (stringp command-name) (intern-soft command-name))) + "Return annotation for COMMAND-NAME in M-x completion." + (let* ((fun (intern-soft command-name)) (binding (where-is-internal fun overriding-local-map t)) (obsolete (get fun 'byte-obsolete-info)) (alias (symbol-function fun))) (cond ((symbolp alias) (format " (%s)" alias)) - (obsolete + ((car obsolete) (format " (%s)" (car obsolete))) ((and binding (not (stringp binding))) (format " (%s)" (key-description binding))))))