From: Karl Heuer Date: Mon, 8 Jul 1996 00:17:35 +0000 (+0000) Subject: (mouse-major-mode-menu-1): Always return just a keymap; X-Git-Tag: emacs-19.34~229 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=639829447fd3d9c991eb137ecb2d0700318de1b3;p=emacs.git (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. --- diff --git a/lisp/mouse.el b/lisp/mouse.el index 1f99e41840d..ac8a1f2b466 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -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") - (mouse-major-mode-menu-1 - (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 - submap)))) + (cdr submap))))) ;; Commands that operate on windows.