Running emacs 28.1 whenever I use a mode derived from text-moe or prog-mode the value of context-menu-function is replaced. What is doing this and how can I stop it?
The default is
(context-menu-undo
context-menu-region
context-menu-middle-separator
context-menu-local
context-menu-minor)
For elisp modes I see
(t
prog-context-menu
elisp-context-menu)
I have run this using emacs -Q
so it is not any of my code or any package.
I have grepped the emacs source code and I think the variable is only alteed by add-hook e.g. in emacs-lisp.el
(add-hook 'context-menu-functions #'elisp-context-menu 10 t)