From 06d86b954d2cdb40c77fdce2264f660c26955171 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 10 Sep 2020 01:42:53 +0200 Subject: [PATCH] Make M-x show what aliases point to (Bug#43300) * lisp/simple.el (read-extended-command--annotation): Show an annotation for aliases saying what it points to. --- lisp/simple.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 16ff8637b95..b00f6bba06d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1887,8 +1887,11 @@ to get different commands to edit and resubmit." (defun read-extended-command--annotation (command-name) (let* ((fun (and (stringp command-name) (intern-soft command-name))) (binding (where-is-internal fun overriding-local-map t)) - (obsolete (get fun 'byte-obsolete-info))) - (cond (obsolete + (obsolete (get fun 'byte-obsolete-info)) + (alias (symbol-function fun))) + (cond ((symbolp alias) + (format " (%s)" alias)) + (obsolete (format " (%s)" (car obsolete))) ((and binding (not (stringp binding))) (format " (%s)" (key-description binding)))))) -- 2.39.5