153 |
|
|
154 |
(defvar mouse-major-mode-menu-prefix) ; dynamically bound |
(defvar mouse-major-mode-menu-prefix) ; dynamically bound |
155 |
|
|
156 |
(defun mouse-major-mode-menu (event prefix) |
(defun mouse-major-mode-menu (event &optional prefix) |
157 |
"Pop up a mode-specific menu of mouse commands. |
"Pop up a mode-specific menu of mouse commands. |
158 |
Default to the Edit menu if the major mode doesn't define a menu." |
Default to the Edit menu if the major mode doesn't define a menu." |
159 |
;; Switch to the window clicked on, because otherwise |
;; Switch to the window clicked on, because otherwise |
173 |
;; default to the edit menu. |
;; default to the edit menu. |
174 |
(newmap (if ancestor |
(newmap (if ancestor |
175 |
(make-sparse-keymap (concat mode-name " Mode")) |
(make-sparse-keymap (concat mode-name " Mode")) |
176 |
menu-bar-edit-menu)) |
menu-bar-edit-menu))) |
|
result) |
|
177 |
(if ancestor |
(if ancestor |
178 |
;; Make our menu inherit from the desired keymap which we want |
;; Make our menu inherit from the desired keymap which we want |
179 |
;; to display as the menu now. |
;; to display as the menu now. |