Commit 63982944 authored by Karl Heuer's avatar Karl Heuer
Browse files

(mouse-major-mode-menu-1): Always return just a keymap;

never (STRING . KEYMAP).
(mouse-major-mode-menu): Discard the `keymap' from the front of
the keymap we get from mouse-major-mode-menu-1.
Construct the menu name string from major-mode.
parent 9d02faa7
......@@ -51,10 +51,10 @@
(unread-command-events (list event)))
;; Make a keymap in which our last command leads to a menu
(define-key newmap (vector (car event))
(nconc (make-sparse-keymap "Menu")
(and (current-local-map)
(lookup-key (current-local-map) [menu-bar])))))
(nconc (make-sparse-keymap (concat mode-name " Mode"))
(cdr (mouse-major-mode-menu-1
(and (current-local-map)
(lookup-key (current-local-map) [menu-bar]))))))
(mouse-major-mode-menu-compute-equiv-keys newmap)
;; Make NEWMAP override the usual definition
;; of the mouse button that got us here.
......@@ -100,7 +100,7 @@
(setq submap (cdr (car tail)))))
(setq tail (cdr tail)))
(if (eq submap t) menubar
(cdr submap)))))
;; Commands that operate on windows.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment