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

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

bug#50067: Context menus


From: Eli Zaretskii
Subject: bug#50067: Context menus
Date: Wed, 18 Aug 2021 20:46:53 +0300

> From: Juri Linkov <juri@linkov.net>
> Date: Wed, 18 Aug 2021 19:42:12 +0300
> Cc: 50067@debbugs.gnu.org, Tak Kunihiro <homeros.misasa@gmail.com>,
>  tkk@misasa.okayama-u.ac.jp, Lars Ingebrigtsen <larsi@gnus.org>,
>  Alan Third <alan@idiocy.org>
> 
> > 2. The context menu contains the disabled entry "Context Menu" as some kind
> > of title – that is very alien on macOS where context menus never have
> > titles. I believe the same is true at least on Windows, and frankly, there
> > should be no need to explicitly tell the user that what he or she is
> > looking at is a context menu. I suggest we just drop the title on
> > all platforms.
> >
> > Replacing (purecopy "Context Menu") by "" in `context-menu-entry` makes it
> > go away, but then we get the new title "Select" from heavens knows where
> > (menu.c, from the look of it). Apparently the Emacs menu system just wants
> > a title; we should find a way to disable it in popup menus.
> 
> After trying to remove it altogether, there is no title at all,
> but maybe it's platform-dependent (I tested on GTK):
> 
> diff --git a/lisp/mouse.el b/lisp/mouse.el
> index 9b7d4c240f..5193994231 100644
> --- a/lisp/mouse.el
> +++ b/lisp/mouse.el
> @@ -304,7 +304,7 @@ context-menu-filter-function
>  (defun context-menu-map ()
>    "Return composite menu map."
> -  (let ((menu (make-sparse-keymap "Context Menu")))
> +  (let ((menu (make-sparse-keymap)))
>      (run-hook-wrapped 'context-menu-functions
>                        (lambda (fun)
>                          (setq menu (funcall fun menu))

I see you already pushed this, but it's a bad idea: it makes ugly
context menus on TTYs (and AFAIU also on non-toolkit X builds): these
_require_ the menu name because they display a caption which looks bad
with an empty name.

I don't really understand the original complaint: we have similar
captions on the menu shown by C-mouse-3 in the default configuration:
do macOS users want those to be removed as well?  If not, what is the
difference?





reply via email to

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