emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 06d86b9 2/2: Make M-x show what aliases point to (Bug#43300)


From: Stefan Kangas
Subject: master 06d86b9 2/2: Make M-x show what aliases point to (Bug#43300)
Date: Sun, 13 Sep 2020 09:06:16 -0400 (EDT)

branch: master
commit 06d86b954d2cdb40c77fdce2264f660c26955171
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    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 16ff863..b00f6bb 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))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]