summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1996-07-08 00:17:35 +0000
committerKarl Heuer <kwzh@gnu.org>1996-07-08 00:17:35 +0000
commit023228f5664a7d142cfe682fd431056832276e2e (patch)
tree6505fe81ad3b9bce5684803ae15cc9182e9014a5
parentdcb11c2b3a5b3f377b856f35e88e721cfd7a508a (diff)
downloademacs-023228f5664a7d142cfe682fd431056832276e2e.tar.gz
(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.
-rw-r--r--lisp/mouse.el10
1 files changed, 5 insertions, 5 deletions
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.