Variable: context-menu-functions

context-menu-functions is a customizable variable defined in mouse.el.gz.

Documentation

List of functions that produce the contents of the context menu.

Each function receives the menu and the mouse click event as its arguments and should return the same menu with changes such as added new menu items.

This variable was added, or its default value changed, in Emacs 28.1.

Probably introduced at or before Emacs version 28.1.

Source Code

;; Defined in /usr/src/emacs/lisp/mouse.el.gz
;; Context menus.

(defcustom context-menu-functions '(context-menu-undo
                                    context-menu-region
                                    context-menu-middle-separator
                                    context-menu-local
                                    context-menu-minor)
  "List of functions that produce the contents of the context menu.
Each function receives the menu and the mouse click event as its arguments
and should return the same menu with changes such as added new menu items."
  :type '(repeat
          (choice (function-item context-menu-undo)
                  (function-item context-menu-region)
                  (function-item context-menu-middle-separator)
                  (function-item context-menu-toolbar)
                  (function-item context-menu-global)
                  (function-item context-menu-local)
                  (function-item context-menu-minor)
                  (function-item context-menu-buffers)
                  (function-item context-menu-vc)
                  (function-item context-menu-ffap)
                  (function :tag "Custom function")))
  :version "28.1")