Mercurial > emacs
comparison lisp/mouse.el @ 31390:cf8964e1d7e3
(mouse-major-mode-menu, mouse-popup-menubar): Run
menu-bar-update-hook.
author | Dave Love <fx@gnu.org> |
---|---|
date | Mon, 04 Sep 2000 21:20:51 +0000 |
parents | f329cce08485 |
children | 83fe15f82f7e |
comparison
equal
deleted
inserted
replaced
31389:5114aeb0f8e6 | 31390:cf8964e1d7e3 |
---|---|
103 Default to the Edit menu if the major mode doesn't define a menu." | 103 Default to the Edit menu if the major mode doesn't define a menu." |
104 ;; Switch to the window clicked on, because otherwise | 104 ;; Switch to the window clicked on, because otherwise |
105 ;; the mode's commands may not make sense. | 105 ;; the mode's commands may not make sense. |
106 (interactive "@e\nP") | 106 (interactive "@e\nP") |
107 ;; Let the mode update its menus first. | 107 ;; Let the mode update its menus first. |
108 (run-hooks 'activate-menubar-hook) | 108 (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) |
109 (let* (;; This is where mouse-major-mode-menu-prefix | 109 (let* (;; This is where mouse-major-mode-menu-prefix |
110 ;; returns the prefix we should use (after menu-bar). | 110 ;; returns the prefix we should use (after menu-bar). |
111 ;; It is either nil or (SOME-SYMBOL). | 111 ;; It is either nil or (SOME-SYMBOL). |
112 (mouse-major-mode-menu-prefix nil) | 112 (mouse-major-mode-menu-prefix nil) |
113 ;; Keymap from which to inherit; may be null. | 113 ;; Keymap from which to inherit; may be null. |
164 (defun mouse-popup-menubar (event prefix) | 164 (defun mouse-popup-menubar (event prefix) |
165 "Pops up a menu equiavlent to the menu bar a keyboard EVENT with PREFIX. | 165 "Pops up a menu equiavlent to the menu bar a keyboard EVENT with PREFIX. |
166 The contents are the items that would be in the menu bar whether or | 166 The contents are the items that would be in the menu bar whether or |
167 not it is actually displayed." | 167 not it is actually displayed." |
168 (interactive "@e \nP") | 168 (interactive "@e \nP") |
169 (run-hooks 'activate-menubar-hook) | 169 (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) |
170 (let* ((local-menu (and (current-local-map) | 170 (let* ((local-menu (and (current-local-map) |
171 (lookup-key (current-local-map) [menu-bar]))) | 171 (lookup-key (current-local-map) [menu-bar]))) |
172 (global-menu (lookup-key global-map [menu-bar])) | 172 (global-menu (lookup-key global-map [menu-bar])) |
173 ;; If a keymap doesn't have a prompt string (a lazy | 173 ;; If a keymap doesn't have a prompt string (a lazy |
174 ;; programmer didn't bother to provide one), create it and | 174 ;; programmer didn't bother to provide one), create it and |