Philip Kaludercic writes: > Juri Linkov 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). It turns out the issue here is that context-menu-dictionary uses define-key instead of define-key-after. Here is a patch to fix it: