Subject: bug#50067: Context menus

From: Juri Linkov <[email-masked]>
Date: Tue, 24 Aug 2021 20:23:48 +0300

> I started to understand the system.
> A plug-in to list frames would be something like this.
> I think it is good to have interface to basic utilities such for
> recentf and bookmarks.
>
> (defun context-menu-frame (menu)

There are endless possibilities in creating various submenus.
So the default set of submenus is limited only to already existing menus:

context-menu-toolbar copied from the tool-bar
context-menu-global copied from the global menu-bar
context-menu-local copied from the local menu-bar
context-menu-minor copied from the minor-modes menu-bar
context-menu-vc copied from the vc menu
context-menu-undo copied from the Edit menu
context-menu-region copied from the Edit menu

So if you can find an existing menu, it could be added.
But I can't find the existing menu with a list of frames.
There are only the existing menu with a list of buffers
like you proposed (mouse-buffer-menu-map) from [C-down-mouse-1],
but better to use (mouse-buffer-menu-keymap),
so now context-menu-buffers is added to the default list.

The remaining existing menu is 'mouse-appearance-menu' bound to
[S-down-mouse-1].  I don't know if it's significant enough
to be added to the default list?

Also you proposed a good idea to have a frame menu when
right clicking on the title bar.