Mercurial > emacs
comparison lisp/mouse.el @ 111923:df8c73722b0d
mouse.el fix for bug#7586.
* lisp/mouse.el (mouse-menu-major-mode-map, mouse-menu-bar-map):
Run hooks to update menu contents.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Tue, 07 Dec 2010 19:32:31 -0800 |
parents | 3c958232fff8 |
children | c00190a8c8ef 376148b31b5e |
comparison
equal
deleted
inserted
replaced
111922:16dda1d80ad4 | 111923:df8c73722b0d |
---|---|
179 (interactive "@e") | 179 (interactive "@e") |
180 (let ((indicator (car (nth 4 (car (cdr event)))))) | 180 (let ((indicator (car (nth 4 (car (cdr event)))))) |
181 (minor-mode-menu-from-indicator indicator))) | 181 (minor-mode-menu-from-indicator indicator))) |
182 | 182 |
183 (defun mouse-menu-major-mode-map () | 183 (defun mouse-menu-major-mode-map () |
184 (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) | |
184 (let* (;; Keymap from which to inherit; may be null. | 185 (let* (;; Keymap from which to inherit; may be null. |
185 (ancestor (mouse-menu-non-singleton | 186 (ancestor (mouse-menu-non-singleton |
186 (and (current-local-map) | 187 (and (current-local-map) |
187 (local-key-binding [menu-bar])))) | 188 (local-key-binding [menu-bar])))) |
188 ;; Make a keymap in which our last command leads to a menu or | 189 ;; Make a keymap in which our last command leads to a menu or |
211 | 212 |
212 (defun mouse-menu-bar-map () | 213 (defun mouse-menu-bar-map () |
213 "Return a keymap equivalent to the menu bar. | 214 "Return a keymap equivalent to the menu bar. |
214 The contents are the items that would be in the menu bar whether or | 215 The contents are the items that would be in the menu bar whether or |
215 not it is actually displayed." | 216 not it is actually displayed." |
217 (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) | |
216 (let* ((local-menu (and (current-local-map) | 218 (let* ((local-menu (and (current-local-map) |
217 (lookup-key (current-local-map) [menu-bar]))) | 219 (lookup-key (current-local-map) [menu-bar]))) |
218 (global-menu (lookup-key global-map [menu-bar])) | 220 (global-menu (lookup-key global-map [menu-bar])) |
219 ;; If a keymap doesn't have a prompt string (a lazy | 221 ;; If a keymap doesn't have a prompt string (a lazy |
220 ;; programmer didn't bother to provide one), create it and | 222 ;; programmer didn't bother to provide one), create it and |
2605 (defalias 'mldrag-drag-vertical-line 'mouse-drag-vertical-line) | 2607 (defalias 'mldrag-drag-vertical-line 'mouse-drag-vertical-line) |
2606 (make-obsolete 'mldrag-drag-mode-line 'mouse-drag-mode-line "21.1") | 2608 (make-obsolete 'mldrag-drag-mode-line 'mouse-drag-mode-line "21.1") |
2607 (make-obsolete 'mldrag-drag-vertical-line 'mouse-drag-vertical-line "21.1") | 2609 (make-obsolete 'mldrag-drag-vertical-line 'mouse-drag-vertical-line "21.1") |
2608 (provide 'mldrag) | 2610 (provide 'mldrag) |
2609 | 2611 |
2610 ;; arch-tag: 9a710ce1-914a-4923-9b81-697f7bf82ab3 | |
2611 ;;; mouse.el ends here | 2612 ;;; mouse.el ends here |