Subject: bug#78660: [PATCH] Add context menu for commenting in prog-mode

From: Juri Linkov <[email-masked]>
Date: Fri, 06 Jun 2025 18:40:19 +0300

> IMO the current way of implementing context menus are not readable
> enough. I've looked the source code of functions like prog-context-menu,
> dired-context-menu, they tends to use `when` to control whether a menu is
> visible, which is more complex. I think we should use :visible to replace
> them to make them more readable.

There is no need to use :visible when context menus are constructed
dynamically on every mouse click since the menu content depends on
context including text properties that define the context functions.

> By the way, before context menu is implemented, users can already see the
> menu bar items by right-click, so IMO displaying all the commands should
> have implemented (if the menu bar has all the commands).

These menus already can be included to the context menu as submenus.