]> git.eshelyaron.com Git - emacs.git/commitdiff
(mouse-major-mode-menu-1): Always return just a keymap;
authorKarl Heuer <kwzh@gnu.org>
Mon, 8 Jul 1996 00:17:35 +0000 (00:17 +0000)
committerKarl Heuer <kwzh@gnu.org>
Mon, 8 Jul 1996 00:17:35 +0000 (00:17 +0000)
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.

lisp/mouse.el

index 1f99e41840d17c545aae099d1d229d816d795039..ac8a1f2b466b10e05e80e9e3bb3765f1ba0be867 100644 (file)
        (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.
                (setq submap (cdr (car tail)))))
          (setq tail (cdr tail)))
        (if (eq submap t) menubar
-         submap))))
+         (cdr submap)))))
 \f
 ;; Commands that operate on windows.