* Re: master 3665735: Sort the items in 'mode-line-mode-menu' before displaying the menu
@ 2021-06-24 16:22 Eli Zaretskii
2021-06-24 17:13 ` Jim Porter
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2021-06-24 16:22 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: emacs-devel
> (defvar mode-line-major-mode-keymap
> (let ((map (make-sparse-keymap)))
> (bindings--define-key map [mode-line down-mouse-1]
> `(menu-item "Menu Bar" ignore
> :filter ,(lambda (_) (mouse-menu-major-mode-map))))
> (define-key map [mode-line mouse-2] 'describe-mode)
> - (define-key map [mode-line down-mouse-3] mode-line-mode-menu)
> + (bindings--define-key map [mode-line down-mouse-3]
> + `(menu-item "Menu Bar" ,mode-line-mode-menu
> + :filter bindings--sort-keymap))
> map) "\
> Keymap to display on major mode.")
>
> (defvar mode-line-minor-mode-keymap
> - (let ((map (make-sparse-keymap)))
> + (let ((map (make-sparse-keymap))
> + (mode-menu-binding
> + `(menu-item "Menu Bar" ,mode-line-mode-menu
> + :filter bindings--sort-keymap)))
> (define-key map [mode-line down-mouse-1] 'mouse-minor-mode-menu)
Why does this use "Menu Bar" as the first arg of menu-item?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: master 3665735: Sort the items in 'mode-line-mode-menu' before displaying the menu
2021-06-24 16:22 master 3665735: Sort the items in 'mode-line-mode-menu' before displaying the menu Eli Zaretskii
@ 2021-06-24 17:13 ` Jim Porter
2021-06-25 13:58 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Jim Porter @ 2021-06-24 17:13 UTC (permalink / raw)
To: Eli Zaretskii, Lars Ingebrigtsen; +Cc: emacs-devel
On 6/24/2021 9:22 AM, Eli Zaretskii wrote:
>> (defvar mode-line-major-mode-keymap
>> (let ((map (make-sparse-keymap)))
>> (bindings--define-key map [mode-line down-mouse-1]
>> `(menu-item "Menu Bar" ignore
>> :filter ,(lambda (_) (mouse-menu-major-mode-map))))
>> (define-key map [mode-line mouse-2] 'describe-mode)
>> - (define-key map [mode-line down-mouse-3] mode-line-mode-menu)
>> + (bindings--define-key map [mode-line down-mouse-3]
>> + `(menu-item "Menu Bar" ,mode-line-mode-menu
>> + :filter bindings--sort-keymap))
>> map) "\
>> Keymap to display on major mode.")
>>
>> (defvar mode-line-minor-mode-keymap
>> - (let ((map (make-sparse-keymap)))
>> + (let ((map (make-sparse-keymap))
>> + (mode-menu-binding
>> + `(menu-item "Menu Bar" ,mode-line-mode-menu
>> + :filter bindings--sort-keymap)))
>> (define-key map [mode-line down-mouse-1] 'mouse-minor-mode-menu)
>
> Why does this use "Menu Bar" as the first arg of menu-item?
Just a paste-o, I'm afraid. They could probably be renamed to "Minor
Modes", assuming I'm understanding how that string is used.
- Jim
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-25 13:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-24 16:22 master 3665735: Sort the items in 'mode-line-mode-menu' before displaying the menu Eli Zaretskii
2021-06-24 17:13 ` Jim Porter
2021-06-25 13:58 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).