Function: context-menu-local

context-menu-local is a byte-compiled function defined in mouse.el.gz.

Signature

(context-menu-local MENU CLICK)

Documentation

Populate MENU with submenus provided by major mode.

Source Code

;; Defined in /usr/src/emacs/lisp/mouse.el.gz
(defun context-menu-local (menu _click)
  "Populate MENU with submenus provided by major mode."
  (run-hooks 'activate-menubar-hook 'menu-bar-update-hook)
  (define-key-after menu [separator-local] menu-bar-separator)
  (let ((keymap (local-key-binding [menu-bar])))
    (when keymap
      (map-keymap (lambda (key binding)
                    (when (consp binding)
                      (define-key-after menu (vector key)
                        (copy-sequence binding))))
                  (menu-bar-keymap keymap))))
  menu)