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: Philip Kaludercic
Subject: bug#50552: 28.0.50; Add context-menu-occur
Date: Wed, 29 Sep 2021 10:00:11 +0000

Juri Linkov <juri@linkov.net> writes:

>>>> 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

Why not use the new custom-add-choice function (or something along these
lines) in dictionary.el?

> 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 my case I am setting context-menu-functions manually, without
add-hook. I am not sure if that breaks anything?

> 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.

Great, thank you.

-- 
        Philip Kaludercic





reply via email to

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