GNU bug report logs - #78391
30.0.92; remapped command's docstring still claims to have menu invocation

Previous Next

Package: emacs;

Reported by: Jake <jforst.mailman <at> gmail.com>

Date: Mon, 12 May 2025 12:21:02 UTC

Severity: normal

Found in version 30.0.92

Done: Eli Zaretskii <eliz <at> gnu.org>

Full log


Message #8 received at 78391 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jake <jforst.mailman <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 78391 <at> debbugs.gnu.org
Subject: Re: bug#78391: 30.0.92;
 remapped command's docstring still claims to have menu invocation
Date: Mon, 12 May 2025 15:42:01 +0300
> From: Jake <jforst.mailman <at> gmail.com>
> Date: Mon, 12 May 2025 12:19:33 +0000
> 
> From emacs -Q, evaluate
>   (keymap-global-set "<remap> <list-buffers>" #'ibuffer)
> then C-h f list-buffers RET
> 
> The docstring includes:
> 
> "Its keys are remapped to ‘ibuffer’.  Without this remapping, it would
> be bound to C-x C-b.
> It can also be invoked from the menu: Buffers → List All Buffers"
> 
> It cannot be invoked from the menu as the menu item is also remapped.

Thanks.  Does the patch below give good results?

Stefan, any comments?

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index e7bbd25..aacdcc5 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -624,8 +624,11 @@ help-fns--key-bindings
               (let ((start (point)))
                 (help-fns--insert-menu-bindings
                  menus
-                 (concat "It can " (and keys "also ")
-                         "be invoked from the menu: "))
+                 (if remapped
+                     (concat "Without the remapping, it could "
+                             (and keys "also ") "be invoked from the menu: ")
+                   (concat "It can " (and keys "also ")
+                           "be invoked from the menu: ")))
                 (fill-region-as-paragraph start (point))))
             (ensure-empty-lines)))))))
 




This bug report was last modified 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.