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

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

bug#50552: 28.0.50; Add context-menu-occur


From: Juri Linkov
Subject: bug#50552: 28.0.50; Add context-menu-occur
Date: Wed, 29 Sep 2021 10:19:29 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>>> I see, but I wonder why dictionary.el directly manipulates
>>> context-menu-functions with add-hook.
>>
>> The reasoning was the following: by default, dictionary.el is not loaded,
>> so its context menu item is not used.  But when the user wants to use
>> dictionary.el and explicitly loads it, then automatically provide also
>> its context menu item.
>
> On this topic, I am not sure how good it is to do this
> automatically. One effect seems to be that context-menu-dictionary
> inserts itself at an unintended place in the menu (in my case as the
> first item, even though I'd prefer it to be further down). Might it make
> more sense to autoload context-menu-dictionary and let the user manually
> add it to context-menu-functions?

Then we need to decide what is the preferred way for the users
to add the dictionary menu item to the context menu.

1. One possible way is allow the user to customize context-menu-functions,
   and manually paste context-menu-dictionary to the entry field:

  INS DEL Choice: Value Menu Custom function: context-menu-dictionary

2. To allow using 'add-hook' in the user's init file with e.g.

  (add-hook 'context-menu-functions 'context-menu-dictionary 1)

In either case, 'context-menu-dictionary' should be autoloaded
like you suggested.  So now I've changed dictionary.el according to this,
thanks for the suggestion.





reply via email to

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