From 7ff8671713fbdbb34c8ae3221c83c19c4911eb4c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 13 May 2025 18:50:31 +0300 Subject: [PATCH] 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) --- lisp/help-fns.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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))))))) -- 2.39.5