Subject: Re: bug#78391: 30.0.92; remapped command's docstring still claims to have menu invocation

From: Jake <[email-masked]>
Date: Tue, 13 May 2025 00:30:18 +0930

How about:

Its keys and menu entry are remapped to ‘ibuffer’.
    Without this remapping, it would be bound to C-x C-b
    and to the menu entry Buffers → List All Buffers

On Tue, 13 May 2025 at 12:20 am, Stefan Monnier <[email-masked]>
wrote:

> > 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)))))))
> >
>
> It gives a rather redundant text since the same "Without the remapping"
> is used just above for the key bindings.  As a user I'd prefer it
> integrated into that previous sentence to end up with a text along the
> lines of:
>
>     Its keys are remapped to ‘ibuffer’.
>     Without this remapping, it would be bound to C-x C-b
>     and to the menu entry Buffers → List All Buffers
>
>
> - Stefan
>
>