Mercurial > emacs
comparison lisp/mouse.el @ 15657:6ad5994053af
(mouse-major-mode-menu-1): No need to copy the top
levels of structure.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Sat, 13 Jul 1996 00:55:05 +0000 |
parents | 6a3622bb0f31 |
children | 2fe76a330b1e |
comparison
equal
deleted
inserted
replaced
15656:e73cd7ff1d4a | 15657:6ad5994053af |
---|---|
97 (if submap | 97 (if submap |
98 (setq submap t) | 98 (setq submap t) |
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 |
123 ;; Commands that operate on windows. | 106 ;; Commands that operate on windows. |
124 | 107 |