[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: |
Tue, 31 Aug 2021 20:43:36 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
>>> ** no multiple horizontal lines
>>>
>>> Sometimes I see double lines on the context menu. I think that there is
>>> no useful case to have double lines. To allow only one horizontal line
>>> would look cool.
>>
>> Right, double separators should be removed.
>
> OK.
This is not easy to do. Because there are menu-items
that use the filter :visible, e.g.:
(defun prog-context-menu (menu)
(require 'xref)
(define-key-after menu [prog-separator] menu-bar-separator
'mark-whole-buffer)
(define-key-after menu [xref-find-def]
'(menu-item "Find Definition" xref-find-definitions-at-mouse
:visible (save-excursion
(mouse-set-point last-input-event)
(xref-backend-identifier-at-point
(xref-find-backend)))
:help "Find definition of identifier")
'prog-separator)
So it's not known whether the menu-item will be displayed
until the menu is displayed. So there is no way to remove
a stray separator in the context-menu function that creates
the context menu.
Maybe such items should be rewritten to avoid the filter :visible,
e.g.:
(defun prog-context-menu (menu)
(require 'xref)
(define-key-after menu [prog-separator] menu-bar-separator
'mark-whole-buffer)
(when (save-excursion
(mouse-set-point last-input-event)
(xref-backend-identifier-at-point
(xref-find-backend)))
(define-key-after menu [xref-find-def]
'(menu-item "Find Definition" xref-find-definitions-at-mouse
:help "Find definition of identifier")
'prog-separator))
- bug#50067: Context menus, (continued)
- bug#50067: Context menus, Tak Kunihiro, 2021/08/22
- bug#50067: Context menus, Juri Linkov, 2021/08/23
- bug#50067: Context menus, Tak Kunihiro, 2021/08/24
- bug#50067: Context menus, Juri Linkov, 2021/08/24
- bug#50067: Context menus, Tak Kunihiro, 2021/08/24
- bug#50067: Context menus, Juri Linkov, 2021/08/25
- bug#50067: Context menus, Juri Linkov, 2021/08/26
- bug#50067: Context menus, Juri Linkov, 2021/08/27
- bug#50067: Context menus, Tak Kunihiro, 2021/08/28
- bug#50067: Context menus, Juri Linkov, 2021/08/31
- bug#50067: Context menus,
Juri Linkov <=
- bug#50067: Context menus, Eli Zaretskii, 2021/08/31
bug#50067: Context menus, Eli Zaretskii, 2021/08/18
bug#50067: Context menus, Juri Linkov, 2021/08/18
bug#50067: Context menus, Eli Zaretskii, 2021/08/18
bug#50067: Context menus, Eli Zaretskii, 2021/08/18
bug#50067: Context menus, Stefan Monnier, 2021/08/18
bug#50067: Context menus, Eli Zaretskii, 2021/08/19
bug#50067: Context menus, Juri Linkov, 2021/08/18