aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1996-07-13 00:55:05 +0000
committerKarl Heuer1996-07-13 00:55:05 +0000
commitd3e458b05384b5d7bd76a770815f012845165dc0 (patch)
tree18bb8e8c2704f2d2fe34587fe0e5580671b9cc1d
parent1f0c496bc5ddc4259731f04bd5d3c4e1d3906ac9 (diff)
downloademacs-d3e458b05384b5d7bd76a770815f012845165dc0.tar.gz
emacs-d3e458b05384b5d7bd76a770815f012845165dc0.zip
(mouse-major-mode-menu-1): No need to copy the top
levels of structure.
-rw-r--r--lisp/mouse.el19
1 files changed, 1 insertions, 18 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 1f7124e90fb..7ffc98c7a9d 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -99,24 +99,7 @@
99 (setq submap (car tail)))) 99 (setq submap (car tail))))
100 (setq tail (cdr tail))) 100 (setq tail (cdr tail)))
101 (if (eq submap t) 101 (if (eq submap t)
102 ;; We have more than one submap, so we want to 102 menubar
103 ;; return a keymap just like menubar.
104 ;; But first copy the top level structure of the menu,
105 ;; enough so that adding equiv-keys to this copy
106 ;; won't alter menubar itself.
107 ;; This is a kludge, and next version
108 ;; we'll change the menu bar code not to mind
109 ;; if there are X equiv keys there.
110 (let ((newmap (copy-sequence menubar)))
111 (setq menubar newmap)
112 (while newmap
113 (if (consp (car newmap))
114 (setcar newmap (cons (car (car newmap))
115 (cons (nth 1 (car newmap))
116 (nthcdr 2 (car newmap))))))
117 (setq newmap (cdr newmap)))
118 (setq mouse-major-mode-menu-prefix nil)
119 menubar)
120 (setq mouse-major-mode-menu-prefix (list (car submap))) 103 (setq mouse-major-mode-menu-prefix (list (car submap)))
121 (cdr (cdr submap)))))) 104 (cdr (cdr submap))))))
122 105