From: Eli Zaretskii Date: Tue, 13 May 2025 15:50:31 +0000 (+0300) Subject: Fix description of a remapped command's bindings X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7ff8671713fbdbb34c8ae3221c83c19c4911eb4c;p=emacs.git Fix description of a remapped command's bindings * 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) --- diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 2fe16d9a6c3..c2a03bd04a1 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -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)))))))