Function: occur-context-menu
occur-context-menu is a byte-compiled function defined in
replace.el.gz.
Signature
(occur-context-menu MENU CLICK)
Documentation
Populate MENU with occur commands at CLICK.
To be added to context-menu-functions.
Source Code
;; Defined in /usr/src/emacs/lisp/replace.el.gz
(defun occur-context-menu (menu click)
"Populate MENU with occur commands at CLICK.
To be added to `context-menu-functions'."
(let ((word (thing-at-mouse click 'word))
(sym (thing-at-mouse click 'symbol)))
(when (or word sym)
(define-key-after menu [occur-separator] menu-bar-separator
'middle-separator)
(when sym
(define-key-after menu [occur-symbol-at-mouse]
'(menu-item "Occur Symbol" occur-symbol-at-mouse)
'occur-separator))
(when word
(define-key-after menu [occur-word-at-mouse]
'(menu-item "Occur Word" occur-word-at-mouse)
'occur-separator))))
menu)