Function: dired-context-menu
dired-context-menu is a byte-compiled function defined in dired.el.gz.
Signature
(dired-context-menu MENU CLICK)
Documentation
Populate MENU with Dired mode commands at CLICK.
Source Code
;; Defined in /usr/src/emacs/lisp/dired.el.gz
(defun dired-context-menu (menu click)
"Populate MENU with Dired mode commands at CLICK."
(when (mouse-posn-property (event-start click) 'dired-filename)
(define-key menu [dired-separator] menu-bar-separator)
(let ((easy-menu (make-sparse-keymap "Immediate")))
(easy-menu-define nil easy-menu nil
'("Immediate"
["Find This File" dired-mouse-find-file
:help "Edit file at mouse click"]
["Find in Other Window" dired-mouse-find-file-other-window
:help "Edit file at mouse click in other window"]))
(dolist (item (reverse (lookup-key easy-menu [menu-bar immediate])))
(when (consp item)
(define-key menu (vector (car item)) (cdr item))))))
menu)