Subject: bug#52293: [External] : bug#52293: 29.0.50; [PATCH v3] Prevent further cases of duplicated separators in context menus

From: Jim Porter <[email-masked]>
Date: Mon, 13 Dec 2021 21:41:06 -0800

On 12/13/2021 10:58 AM, Juri Linkov wrote:
> I agree that using an extend-format separator is a good idea,
> especially if we'll provide a special variable that will contain it.
> But I don't understand why opt-in.  I think opt-out would be better
> since most of the time the users want to have de-duplicated menus.

One benefit to this being opt-in would be that it would be possible to 
(eventually) support the de-duplication behavior for *all* menus without 
us having to worry about breaking compatibility for other menus[1]. If 
we provide a constant for people to use like in your earlier example[2], 
it would be still be reasonably simple to use.

I think it would be nice to (again, eventually) support this for all 
menus, since it's probably useful in some other places, and it would 
keep the differences between specific menus' behaviors to a minimum.

> Maybe better first to try fixing the problem using the separators?
> When this doesn't help, only then we could consider alternatives.

Ok, let's stick with deduplication then. I'll try to write a patch that 
doesn't require `top-separator', since that's easy for programmers to 
forget about (no other menu requires doing that to put items at the 
beginning).

[1] It's not *likely* that people want consecutive separators in other 
menus, but I think it's good to be on the safe side and not break 
compatibility for anyone who does want that.

[2] https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-12/msg01100.html