[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 3665735: Sort the items in 'mode-line-mode-menu' before displ
From: |
Eli Zaretskii |
Subject: |
Re: master 3665735: Sort the items in 'mode-line-mode-menu' before displaying the menu |
Date: |
Thu, 24 Jun 2021 19:22:59 +0300 |
> (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?
- Re: master 3665735: Sort the items in 'mode-line-mode-menu' before displaying the menu,
Eli Zaretskii <=