bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52293: 29.0.50; [PATCH v2] Prevent further cases of duplicated separ


From: Juri Linkov
Subject: bug#52293: 29.0.50; [PATCH v2] Prevent further cases of duplicated separators in context menus
Date: Tue, 07 Dec 2021 10:19:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

> For the top separator, maybe instead of providing a function for users to
> put wherever they like in `context-menu-functions', we could just add it
> directly in `context-menu-map' immediately before calling the functions in
> `context-menu-functions'? Since it's supposed to be at the top, it doesn't
> make a lot of sense to be able to customize where it goes.
>
> It does makes sense to customize where `middle-separator' goes though; what
> the user considers the "middle" depends on what other menu items are
> normally present. However, if the user didn't include
> `context-menu-middle-separator', then
>
>   (define-key-after menu [foo] '(menu-item ...) 'middle-separator)
>
> just adds `foo' to the end of the menu. That seems ok to me. Then, adding
> after `top-separator' puts your item at the beginning of the menu, and
> adding after `middle-separator' puts your item at the middle or the end,
> depending on the user's configuration. How does that sound to you?

Thanks, this makes perfect sense.  I vote for pushing this to emacs-28,
so the authors of packages could rely on this scheme.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]