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

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

bug#50067: Context menus


From: Juri Linkov
Subject: bug#50067: Context menus
Date: Thu, 18 Nov 2021 20:38:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>> Currently the option context-menu-global of context-menu-functions
>> doesn't take into account the variable menu-bar-final-items
>> to properly order the menu items.  This patch makes it possible
>> to order the items of global-map instead of menu-bar-current-active-maps
>> used in menu-bar-keymap by default:
>
> Actually, here is a better patch that will also allow sorting items on
> context-menu-local as well.  The same KEYMAP arg of menu-bar-keymap
> could be used also in mouse-menu-bar-map to sort items of [C-down-mouse-3]
> in the right order (they were unsorted for a long time):

Only part of the patch that fixes the new feature was pushed to emacs-28.
But the following part that fixes the old function could pushed to master later:

> diff --git a/lisp/mouse.el b/lisp/mouse.el
> index d6912892ef..5b9ae121d7 100644
> --- a/lisp/mouse.el
> +++ b/lisp/mouse.el
> @@ -271,10 +271,10 @@ mouse-menu-bar-map
>      ;; FIXME: We have a problem here: we have to use the global/local/minor
>      ;; so they're displayed in the expected order, but later on in the 
> command
>      ;; loop, they're actually looked up in the opposite order.
> -    (apply 'append
> -           global-menu
> -           local-menu
> -           minor-mode-menus)))
> +    (menu-bar-keymap (apply 'append
> +                            global-menu
> +                            local-menu
> +                            minor-mode-menus))))





reply via email to

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