]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix description of a remapped command's bindings
authorEli Zaretskii <eliz@gnu.org>
Tue, 13 May 2025 15:50:31 +0000 (18:50 +0300)
committerEshel Yaron <me@eshelyaron.com>
Wed, 14 May 2025 12:35:12 +0000 (14:35 +0200)
* lisp/help-fns.el (help-fns--key-bindings): Qualify the
description of any menu-bar bindings by remapping.  (Bug#78391)

(cherry picked from commit ebeeced9e3ca94bbb679730155a2582bc12f8ea7)

lisp/help-fns.el

index 2fe16d9a6c3acadd7f8a72832eedd33db88d9042..c2a03bd04a12c6ab77bb4c2fc284f248ce5d6249 100644 (file)
@@ -642,8 +642,15 @@ the C sources, too."
               (let ((start (point)))
                 (help-fns--insert-menu-bindings
                  menus
-                 (concat "It can " (and keys "also ")
+                 (concat "It " (if remapped "could " "can ") (and keys "also ")
                          "be invoked from the menu: "))
+                (when remapped
+                  (princ ", but that was remapped to ")
+                  (princ (if (symbolp remapped)
+                             (format-message "`%s'" remapped)
+                          "an anonymous command"))
+                  (princ "as well.\n"))
+                (or remapped (princ "."))
                 (fill-region-as-paragraph start (point))))
             (ensure-empty-lines)))))))