aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2020-09-10 01:42:53 +0200
committerStefan Kangas2020-09-13 15:05:06 +0200
commit06d86b954d2cdb40c77fdce2264f660c26955171 (patch)
tree5e143122dedce0d9a8f402a663e0a51b7c082964
parent1b0a922a19bf7b380abe89a4e92176c779c26c2d (diff)
downloademacs-06d86b954d2cdb40c77fdce2264f660c26955171.tar.gz
emacs-06d86b954d2cdb40c77fdce2264f660c26955171.zip
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.
-rw-r--r--lisp/simple.el7
1 files 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."
1887(defun read-extended-command--annotation (command-name) 1887(defun read-extended-command--annotation (command-name)
1888 (let* ((fun (and (stringp command-name) (intern-soft command-name))) 1888 (let* ((fun (and (stringp command-name) (intern-soft command-name)))
1889 (binding (where-is-internal fun overriding-local-map t)) 1889 (binding (where-is-internal fun overriding-local-map t))
1890 (obsolete (get fun 'byte-obsolete-info))) 1890 (obsolete (get fun 'byte-obsolete-info))
1891 (cond (obsolete 1891 (alias (symbol-function fun)))
1892 (cond ((symbolp alias)
1893 (format " (%s)" alias))
1894 (obsolete
1892 (format " (%s)" (car obsolete))) 1895 (format " (%s)" (car obsolete)))
1893 ((and binding (not (stringp binding))) 1896 ((and binding (not (stringp binding)))
1894 (format " (%s)" (key-description binding)))))) 1897 (format " (%s)" (key-description binding))))))