Function: org-mouse-show-context-menu
org-mouse-show-context-menu is an interactive and byte-compiled
function defined in org-mouse.el.gz.
Signature
(org-mouse-show-context-menu EVENT PREFIX)
Documentation
Invoke the context menu.
If the value of org-mouse-context-menu-function is a function, then
this function is called. Otherwise, the current major mode menu is used.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-mouse.el.gz
(defun org-mouse-show-context-menu (event prefix)
"Invoke the context menu.
If the value of `org-mouse-context-menu-function' is a function, then
this function is called. Otherwise, the current major mode menu is used."
(interactive "@e \nP")
(if (and (= (event-click-count event) 1)
(or (not mark-active)
(sit-for
(/ (if (fboundp 'mouse-double-click-time) ; Emacs >= 29
(mouse-double-click-time)
double-click-time)
1000.0))))
(progn
(select-window (posn-window (event-start event)))
(when (not (org-mouse-mark-active))
(goto-char (posn-point (event-start event)))
(when (not (eolp)) (save-excursion (run-hooks 'post-command-hook)))
(sit-for 0))
(if (functionp org-mouse-context-menu-function)
(funcall org-mouse-context-menu-function event)
(popup-menu (mouse-menu-major-mode-map) event prefix)))
(setq this-command 'mouse-save-then-kill)
(mouse-save-then-kill event)))