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

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

bug#52973: Adding a few context-menu-mode commands


From: Juri Linkov
Subject: bug#52973: Adding a few context-menu-mode commands
Date: Sat, 08 Jan 2022 20:30:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>> Unless I have missed it, do mean that all context menus should be loaded
>> by default (auto loading all *-context-menu functions and adding all of
>> them to the default value value of context-menu-functions), or that each
>> context menu definition should be accompanied by a add-to-list on
>> context-menu-functions?
>
> I'm not sure I understand why any of what you say should follow.  I'm
> probably missing something.
>
> My mental picture is that context menus are specific to modes.  When a
> buffer has certain modes turned on (one major mode and one or more
> minor modes), those modes are already loaded, and so any functions
> those modes define are already defined.  So when the user right-clicks
> some spot on display, and one or more modes have defined context-menu
> items for this spot, the code which does that is already loaded, and
> calling the functions to produce the menu should not need any
> autoloading.
>
> As for add-to-list, if the implementation of context menus requires
> adding stuff to some list only when the menu is about to be popped up,
> then yes, the add-to-list should be done only when the user clicks.
> But if adding to the list is done when a mode is loaded, then again,
> since all the relevant modes are already loaded, these functions will
> have been added to that list already.
>
> What am I missing?

None of the proposed functions is specific to a mode.
When the global value of context-menu-functions
contains one of the proposed functions, right-clicking anywhere
will autoload every package where such context functions are defined.





reply via email to

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