Subject: bug#78935: 30.1.90; [PATCH] Let Imenu optionally allow duplicate menu entries

From: Drew Adams <[email-masked]>
Date: Sat, 5 Jul 2025 16:20:39 +0000

> > Attached is a slightly better patch.  The option is
> > tested at the level of the mapcar, not within the
> > function arg to mapcar.
> >
> > Also, the doc string of the new option mentions that
> > the option applies only to a Imenu menu, not also to
> > the use of command `imenu', which uses `completing-read'.
> 
> Thanks.
> 
> > +(defcustom imenu-allow-duplicate-menu-items-flag t
> > +  "Non-nil means that Imenu can include duplicate menu items.
> > +For example, if the buffer contains multiple definitions of function
> > +`foo' then a menu item is included for each of them.
> > +Otherwise, only the first such definition is accessible from the menu.
> > +
> > +This option applies only to an Imenu menu, not also to the use of
> > +command `imenu', which uses `completing-read' to read a menu item.
> > +The use of that command doesn't allow duplicate items."
> > +  :type 'boolean :group 'imenu)
> 
> Please add a suitable :version tag.
> Also, this new user option should be called out in NEWS.

Thanks for considering the patch.

. Can you tell me what :version to use - would it be "30.2"?

. I'm not familiar with what's needed for NEWS.  Can you
  let me know what's needed and what form you need it in?

Thx.