0
|
1 ;;; x-menubar.el --- Menubar and popup-menu support for X.
|
|
2
|
|
3 ;; Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
|
4 ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
|
|
5 ;; Copyright (C) 1995 Sun Microsystems.
|
|
6 ;; Copyright (C) 1995, 1996 Ben Wing.
|
|
7
|
|
8 ;; This file is part of XEmacs.
|
|
9
|
|
10 ;; XEmacs is free software; you can redistribute it and/or modify it
|
|
11 ;; under the terms of the GNU General Public License as published by
|
|
12 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
13 ;; any later version.
|
|
14
|
|
15 ;; XEmacs is distributed in the hope that it will be useful, but
|
|
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
18 ;; General Public License for more details.
|
|
19
|
|
20 ;; You should have received a copy of the GNU General Public License
|
70
|
21 ;; along with Xmacs; see the file COPYING. If not, write to the
|
|
22 ;; Free Software Foundation, 59 Temple Place - Suite 330,
|
|
23 ;; Boston, MA 02111-1307, USA.
|
0
|
24
|
|
25 ;;; Commentary:
|
|
26
|
|
27 ;;; Code:
|
|
28
|
70
|
29 ;;; Warning-free compile
|
|
30 (eval-when-compile
|
|
31 (defvar language-environment-list))
|
|
32
|
0
|
33 (defconst default-menubar
|
|
34 (purecopy-menubar
|
|
35 ;; note backquote.
|
|
36 `(
|
|
37 ("File"
|
|
38 :filter file-menu-filter
|
|
39 ["Open..." find-file t]
|
|
40 ["Open in Other Window..." find-file-other-window t]
|
|
41 ["Open in New Frame..." find-file-other-frame t]
|
|
42 ["Insert File..." insert-file t]
|
|
43 ["View File..." view-file t]
|
|
44 "------"
|
|
45 ["Save" save-buffer t nil]
|
|
46 ["Save As..." write-file t]
|
|
47 ["Save Some Buffers" save-some-buffers t]
|
|
48 "-----"
|
|
49 ["Print Buffer" lpr-buffer t nil]
|
|
50 ["Pretty-Print Buffer" ps-print-buffer-with-faces t nil]
|
|
51 "-----"
|
|
52 ["New Frame" make-frame t]
|
|
53 ["Frame on Other Display..."
|
|
54 make-frame-on-display t]
|
|
55 ["Delete Frame" delete-frame t]
|
|
56 "-----"
|
|
57 ["Split Window" split-window-vertically t]
|
|
58 ["Un-Split (Keep This)" delete-other-windows (not (one-window-p t))]
|
|
59 ["Un-Split (Keep Others)" delete-window (not (one-window-p t))]
|
|
60 "-----"
|
|
61 ["Revert Buffer" revert-buffer t nil]
|
|
62 ["Delete Buffer" kill-this-buffer t nil]
|
|
63 "-----"
|
|
64 ["Exit XEmacs" save-buffers-kill-emacs t]
|
|
65 )
|
|
66
|
|
67 ("Edit"
|
|
68 :filter edit-menu-filter
|
|
69 ["Undo" advertised-undo t]
|
|
70 ["Cut" x-kill-primary-selection t]
|
|
71 ["Copy" x-copy-primary-selection t]
|
|
72 ["Paste" x-yank-clipboard-selection t]
|
|
73 ["Clear" x-delete-primary-selection t]
|
|
74 "----"
|
|
75 ["Search..." isearch-forward t]
|
|
76 ["Search Backward..." isearch-backward t]
|
|
77 ["Replace..." query-replace t]
|
|
78 "----"
|
|
79 ["Search (Regexp)..." isearch-forward-regexp t]
|
|
80 ["Search Backward (Regexp)..." isearch-backward-regexp t]
|
|
81 ["Replace (Regexp)..." query-replace-regexp t]
|
|
82 "----"
|
|
83 ("Bookmarks"
|
70
|
84 ["Jump to bookmark" bookmark-menu-jump t]
|
|
85 ["Set bookmark" bookmark-set t]
|
0
|
86 "---"
|
70
|
87 ["Insert contents" bookmark-menu-insert t]
|
|
88 ["Insert location" bookmark-menu-locate t]
|
0
|
89 "---"
|
70
|
90 ["Rename bookmark" bookmark-menu-rename t]
|
|
91 ["Delete bookmark" bookmark-menu-delete t]
|
|
92 ["Edit Bookmark List" bookmark-bmenu-list t]
|
0
|
93 "---"
|
70
|
94 ["Save bookmarks" bookmark-save t]
|
|
95 ["Save bookmarks as..." bookmark-write t]
|
|
96 ["Load a bookmark file" bookmark-load t])
|
0
|
97 "----"
|
|
98 ["Goto Line..." goto-line t]
|
|
99 ["What Line" what-line t]
|
|
100 "----"
|
|
101 ["Start Macro Recording" start-kbd-macro (not defining-kbd-macro)]
|
|
102 ["End Macro Recording" end-kbd-macro defining-kbd-macro]
|
|
103 ["Execute Last Macro" call-last-kbd-macro last-kbd-macro]
|
|
104 )
|
|
105
|
|
106 ("Apps"
|
|
107 ["Read Mail (VM)..." vm t]
|
|
108 ["Read Mail (MH)..." (mh-rmail t) t]
|
|
109 ["Send mail..." mail t]
|
|
110 ["Usenet News" gnus t]
|
|
111 ["Browse the Web" w3 t]
|
|
112 ["Gopher" gopher t]
|
|
113 ["Hyperbole..." hyperbole t]
|
|
114 "----"
|
|
115 ["Spell-Check Buffer" ispell-buffer t]
|
|
116 ["Emulate VI" viper-mode t]
|
|
117 "----"
|
|
118 ("Calendar"
|
|
119 ["3-Month Calendar" calendar t]
|
|
120 ["Diary" diary t]
|
|
121 ["Holidays" holidays t]
|
|
122 ;; we're all pagans at heart ...
|
|
123 ["Phases of the Moon" phases-of-moon t]
|
|
124 ["Sunrise/Sunset" sunrise-sunset t]
|
|
125 )
|
|
126 ("Games"
|
|
127 ["Quote from Zippy" yow t]
|
|
128 ["Psychoanalyst" doctor t]
|
|
129 ["Psychoanalyze Zippy!" psychoanalyze-pinhead t]
|
|
130 ["Random Flames" flame t]
|
|
131 ["Dunnet (Adventure)" dunnet t]
|
|
132 ["Towers of Hanoi" hanoi t]
|
|
133 ["Game of Life" life t]
|
|
134 ["Multiplication Puzzle" mpuz t]
|
|
135 )
|
|
136 )
|
|
137
|
|
138 ("Options"
|
|
139 ["Read Only" (toggle-read-only)
|
|
140 :style toggle :selected buffer-read-only]
|
|
141 ("Editing Options"
|
|
142 ["Overstrike" (progn
|
|
143 (overwrite-mode current-prefix-arg)
|
|
144 (setq-default overwrite-mode overwrite-mode))
|
|
145 :style toggle :selected overwrite-mode]
|
|
146 ["Case Sensitive Search" (progn
|
|
147 (setq case-fold-search (not case-fold-search))
|
|
148 (setq-default case-fold-search
|
|
149 case-fold-search))
|
|
150 :style toggle :selected (not case-fold-search)]
|
|
151 ["Case Matching Replace" (setq case-replace (not case-replace))
|
|
152 :style toggle :selected case-replace]
|
|
153 ["Auto Delete Selection" (if (memq 'pending-delete-pre-hook
|
|
154 pre-command-hook)
|
|
155 (pending-delete-off nil)
|
|
156 (pending-delete-on nil))
|
|
157 :style toggle
|
|
158 :selected (memq 'pending-delete-pre-hook pre-command-hook)]
|
|
159 ["Active Regions" (setq zmacs-regions (not zmacs-regions))
|
|
160 :style toggle :selected zmacs-regions]
|
|
161 ["Mouse Paste At Text Cursor" (setq mouse-yank-at-point
|
|
162 (not mouse-yank-at-point))
|
|
163 :style toggle :selected mouse-yank-at-point]
|
78
|
164 ["Require Newline At End" (setq require-final-newline
|
|
165 (or (eq require-final-newline 'ask)
|
|
166 (not require-final-newline)))
|
|
167 :style toggle :selected (eq require-final-newline 't)]
|
|
168 ["Add Newline When Moving Past End" (setq next-line-add-newlines
|
|
169 (not next-line-add-newlines))
|
|
170 :style toggle :selected next-line-add-newlines]
|
0
|
171 )
|
|
172 ("General Options"
|
|
173 ["Teach Extended Commands" (setq teach-extended-commands-p
|
|
174 (not teach-extended-commands-p))
|
|
175 :style toggle :selected teach-extended-commands-p]
|
|
176 ["Debug On Error" (setq debug-on-error (not debug-on-error))
|
|
177 :style toggle :selected debug-on-error]
|
|
178 ["Debug On Quit" (setq debug-on-quit (not debug-on-quit))
|
|
179 :style toggle :selected debug-on-quit]
|
|
180 )
|
|
181 ("Printing Options"
|
|
182 ["Command-Line Switches for `lpr'/`lp'..."
|
2
|
183 (setq lpr-switches
|
|
184 (read-expression "Switches for `lpr'/`lp': "
|
|
185 (format "%S" lpr-switches)))
|
0
|
186 t]
|
70
|
187 ["Pretty-Print With Color"
|
|
188 (setq ps-print-color-p (not ps-print-color-p))
|
|
189 :style toggle :selected ps-print-color-p]
|
0
|
190 ("Pretty-Print Paper Size"
|
|
191 ["Letter"
|
70
|
192 (setq ps-paper-type 'ps-letter)
|
0
|
193 :style radio
|
70
|
194 :selected (eq ps-paper-type 'ps-letter)]
|
|
195 ["Legal"
|
|
196 (setq ps-paper-type 'ps-legal)
|
16
|
197 :style radio
|
70
|
198 :selected (eq ps-paper-type 'ps-legal)]
|
0
|
199 ["A4"
|
70
|
200 (setq ps-paper-type 'ps-a4)
|
0
|
201 :style radio
|
70
|
202 :selected (eq ps-paper-type 'ps-a4)]
|
0
|
203 )
|
|
204 )
|
|
205 ("\"Other Window\" Location"
|
|
206 ["Always in Same Frame"
|
|
207 (setq get-frame-for-buffer-default-instance-limit nil)
|
|
208 :style radio
|
|
209 :selected (null get-frame-for-buffer-default-instance-limit)]
|
|
210 ["Other Frame (2 Frames Max)"
|
|
211 (setq get-frame-for-buffer-default-instance-limit 2)
|
|
212 :style radio
|
|
213 :selected (eq 2 get-frame-for-buffer-default-instance-limit)]
|
|
214 ["Other Frame (3 Frames Max)"
|
|
215 (setq get-frame-for-buffer-default-instance-limit 3)
|
|
216 :style radio
|
|
217 :selected (eq 3 get-frame-for-buffer-default-instance-limit)]
|
|
218 ["Other Frame (4 Frames Max)"
|
|
219 (setq get-frame-for-buffer-default-instance-limit 4)
|
|
220 :style radio
|
|
221 :selected (eq 4 get-frame-for-buffer-default-instance-limit)]
|
|
222 ["Other Frame (5 Frames Max)"
|
|
223 (setq get-frame-for-buffer-default-instance-limit 5)
|
|
224 :style radio
|
|
225 :selected (eq 5 get-frame-for-buffer-default-instance-limit)]
|
|
226 ["Always Create New Frame"
|
|
227 (setq get-frame-for-buffer-default-instance-limit 0)
|
|
228 :style radio
|
|
229 :selected (eq 0 get-frame-for-buffer-default-instance-limit)]
|
|
230 "-----"
|
|
231 ["Temp Buffers Always in Same Frame"
|
|
232 (setq temp-buffer-show-function 'show-temp-buffer-in-current-frame)
|
|
233 :style radio
|
|
234 :selected (eq temp-buffer-show-function
|
|
235 'show-temp-buffer-in-current-frame)]
|
|
236 ["Temp Buffers Like Other Buffers"
|
|
237 (setq temp-buffer-show-function nil)
|
|
238 :style radio
|
|
239 :selected (null temp-buffer-show-function)]
|
78
|
240 "-----"
|
|
241 ["Make current frame gnuserv target"
|
|
242 (setq gnuserv-frame
|
|
243 (if (equal gnuserv-frame (selected-frame))
|
|
244 nil
|
|
245 (selected-frame)))
|
|
246 :style radio
|
|
247 :selected (equal gnuserv-frame (selected-frame))]
|
0
|
248 )
|
|
249
|
|
250 "-----"
|
|
251 ("Syntax Highlighting"
|
|
252 ["In This Buffer" (font-lock-mode)
|
|
253 :style toggle :selected font-lock-mode]
|
|
254 ["Automatic" (if (not (featurep 'font-lock))
|
|
255 (progn
|
|
256 (setq font-lock-auto-fontify t)
|
|
257 (require 'font-lock))
|
|
258 (setq font-lock-auto-fontify
|
|
259 (not font-lock-auto-fontify)))
|
|
260 :style toggle
|
|
261 :selected (and (featurep 'font-lock) font-lock-auto-fontify)]
|
|
262 "-----"
|
|
263 ["Fonts" (progn (require 'font-lock)
|
|
264 (font-lock-use-default-fonts)
|
|
265 (setq font-lock-use-fonts t
|
|
266 font-lock-use-colors nil)
|
|
267 (font-lock-mode 1))
|
|
268 :style radio
|
|
269 :selected (and font-lock-mode
|
|
270 font-lock-use-fonts)]
|
|
271 ["Colors" (progn (require 'font-lock)
|
|
272 (font-lock-use-default-colors)
|
|
273 (setq font-lock-use-colors t
|
|
274 font-lock-use-fonts nil)
|
|
275 (font-lock-mode 1))
|
|
276 :style radio
|
|
277 :selected (and font-lock-mode
|
|
278 font-lock-use-colors)]
|
|
279 "-----"
|
|
280 ["Least" (if (or (and (not (integerp font-lock-maximum-decoration))
|
|
281 (not (eq t font-lock-maximum-decoration)))
|
|
282 (and (integerp font-lock-maximum-decoration)
|
|
283 (<= font-lock-maximum-decoration 0)))
|
|
284 nil
|
|
285 (setq font-lock-maximum-decoration nil)
|
|
286 (font-lock-recompute-variables))
|
|
287 :style radio
|
|
288 :active font-lock-mode
|
|
289 :selected (and font-lock-mode
|
|
290 (or (and (not (integerp font-lock-maximum-decoration))
|
|
291 (not (eq t font-lock-maximum-decoration)))
|
|
292 (and (integerp font-lock-maximum-decoration)
|
|
293 (<= font-lock-maximum-decoration 0))))]
|
|
294 ["More" (if (and (integerp font-lock-maximum-decoration)
|
|
295 (= 1 font-lock-maximum-decoration))
|
|
296 nil
|
|
297 (setq font-lock-maximum-decoration 1)
|
|
298 (font-lock-recompute-variables))
|
|
299 :style radio
|
|
300 :active font-lock-mode
|
|
301 :selected (and font-lock-mode
|
|
302 (integerp font-lock-maximum-decoration)
|
|
303 (= 1 font-lock-maximum-decoration))]
|
|
304 ["Even More" (if (and (integerp font-lock-maximum-decoration)
|
|
305 (= 2 font-lock-maximum-decoration))
|
|
306 nil
|
|
307 (setq font-lock-maximum-decoration 2)
|
|
308 (font-lock-recompute-variables))
|
|
309 :style radio
|
|
310 :active font-lock-mode
|
|
311 :selected (and font-lock-mode
|
|
312 (integerp font-lock-maximum-decoration)
|
|
313 (= 2 font-lock-maximum-decoration))]
|
|
314 ["Most" (if (or (eq font-lock-maximum-decoration t)
|
|
315 (and (integerp font-lock-maximum-decoration)
|
|
316 (>= font-lock-maximum-decoration 3)))
|
|
317 nil
|
|
318 (setq font-lock-maximum-decoration t)
|
|
319 (font-lock-recompute-variables))
|
|
320 :style radio
|
|
321 :active font-lock-mode
|
|
322 :selected (and font-lock-mode
|
|
323 (or (eq font-lock-maximum-decoration t)
|
|
324 (and (integerp font-lock-maximum-decoration)
|
|
325 (>= font-lock-maximum-decoration 3))))]
|
|
326 "-----"
|
|
327 ["Lazy" (progn (require 'lazy-lock)
|
|
328 (if (and (boundp 'lazy-lock-mode) lazy-lock-mode)
|
|
329 (progn
|
|
330 (lazy-lock-mode 0)
|
|
331 ;; this shouldn't be necessary so there has to
|
|
332 ;; be a redisplay bug lurking somewhere (or
|
|
333 ;; possibly another event handler bug)
|
78
|
334 (redraw-modeline)
|
|
335 (remove-hook 'font-lock-mode-hook
|
|
336 'turn-on-lazy-lock))
|
0
|
337 (if font-lock-mode
|
|
338 (progn
|
|
339 (lazy-lock-mode 1)
|
78
|
340 (redraw-modeline)
|
|
341 (add-hook 'font-lock-mode-hook
|
|
342 'turn-on-lazy-lock)))))
|
0
|
343 :active font-lock-mode
|
|
344 :style toggle
|
|
345 :selected (and (boundp 'lazy-lock-mode) lazy-lock-mode)]
|
|
346 ["Caching" (progn (require 'fast-lock)
|
|
347 (if fast-lock-mode
|
|
348 (progn
|
|
349 (fast-lock-mode 0)
|
|
350 ;; this shouldn't be necessary so there has to
|
|
351 ;; be a redisplay bug lurking somewhere (or
|
|
352 ;; possibly another event handler bug)
|
|
353 (redraw-modeline))
|
|
354 (if font-lock-mode
|
|
355 (progn
|
|
356 (fast-lock-mode 1)
|
|
357 (redraw-modeline)))))
|
|
358 :active font-lock-mode
|
|
359 :style toggle
|
70
|
360 :selected fast-lock-mode]
|
0
|
361 )
|
|
362 ("Paren Highlighting"
|
|
363 ["None" (paren-set-mode -1)
|
|
364 :style radio :selected (not paren-mode)]
|
|
365 ["Blinking Paren" (paren-set-mode 'blink-paren)
|
|
366 :style radio :selected (eq paren-mode 'blink-paren)]
|
|
367 ["Steady Paren" (paren-set-mode 'paren)
|
|
368 :style radio :selected (eq paren-mode 'paren)]
|
|
369 ["Expression" (paren-set-mode 'sexp)
|
|
370 :style radio :selected (eq paren-mode 'sexp)]
|
|
371 ;;; ["Nested Shading" (paren-set-mode 'nested)
|
|
372 ;;; :style radio :selected (eq paren-mode 'nested)]
|
|
373 )
|
|
374 "-----"
|
|
375 ("Frame Appearance"
|
|
376 ,@(if (featurep 'scrollbar)
|
|
377 '(["Scrollbars" (if (= (specifier-instance scrollbar-width) 0)
|
|
378 (progn
|
|
379 (set-specifier scrollbar-width 15)
|
|
380 (set-specifier scrollbar-height 15))
|
|
381 (set-specifier scrollbar-width 0)
|
|
382 (set-specifier scrollbar-height 0))
|
|
383 :style toggle :selected (> (specifier-instance scrollbar-width) 0)]))
|
|
384 ["3D Modeline"
|
|
385 (progn
|
|
386 (if (zerop (specifier-instance modeline-shadow-thickness))
|
|
387 (set-specifier modeline-shadow-thickness 2)
|
|
388 (set-specifier modeline-shadow-thickness 0))
|
|
389 (redraw-modeline t))
|
|
390 :style toggle :selected
|
|
391 (let ((thickness
|
|
392 (specifier-instance modeline-shadow-thickness)))
|
|
393 (and (integerp thickness)
|
|
394 (> thickness 0)))]
|
|
395 ["Truncate Lines" (progn
|
|
396 (setq truncate-lines (not truncate-lines))
|
|
397 (setq-default truncate-lines truncate-lines))
|
|
398 :style toggle :selected truncate-lines]
|
|
399 ["Bar Cursor" (progn
|
|
400 (setq bar-cursor
|
|
401 (if (not bar-cursor) 2 nil))
|
|
402 (force-cursor-redisplay))
|
|
403 :style toggle :selected bar-cursor]
|
|
404 ["Blinking Cursor" (blink-cursor-mode)
|
|
405 :style toggle
|
|
406 :selected (and (boundp 'blink-cursor-mode) blink-cursor-mode)]
|
76
|
407 ["Frame-Local Font Menu" (setq font-menu-this-frame-only-p
|
|
408 (not font-menu-this-frame-only-p))
|
|
409 :style toggle :selected font-menu-this-frame-only-p]
|
0
|
410 ; ["Line Numbers" (line-number-mode nil)
|
|
411 ; :style toggle :selected line-number-mode]
|
|
412 )
|
|
413 ("Menubar Appearance"
|
|
414 ["Buffers Menu Length..."
|
|
415 (progn
|
|
416 (setq buffers-menu-max-size
|
|
417 (read-number
|
|
418 "Enter number of buffers to display (or 0 for unlimited): "))
|
|
419 (if (eq buffers-menu-max-size 0) (setq buffers-menu-max-size nil)))
|
|
420 t]
|
|
421 ["Multi-Operation Buffers Sub-Menus"
|
|
422 (setq complex-buffers-menu-p
|
|
423 (not complex-buffers-menu-p))
|
|
424 :style toggle :selected complex-buffers-menu-p]
|
|
425 ("Buffers Menu Sorting"
|
|
426 ["Most Recently Used"
|
|
427 (progn
|
|
428 (setq buffers-menu-sort-function nil)
|
|
429 (setq buffers-menu-grouping-function nil))
|
|
430 :style radio
|
|
431 :selected (null buffers-menu-sort-function)]
|
|
432 ["Alphabetically"
|
|
433 (progn
|
|
434 (setq buffers-menu-sort-function
|
|
435 'sort-buffers-menu-alphabetically)
|
|
436 (setq buffers-menu-grouping-function nil))
|
|
437 :style radio
|
|
438 :selected (eq 'sort-buffers-menu-alphabetically
|
|
439 buffers-menu-sort-function)]
|
|
440 ["By Major Mode, Then Alphabetically"
|
|
441 (progn
|
|
442 (setq buffers-menu-sort-function
|
|
443 'sort-buffers-menu-by-mode-then-alphabetically)
|
|
444 (setq buffers-menu-grouping-function
|
|
445 'group-buffers-menu-by-mode-then-alphabetically))
|
|
446 :style radio
|
|
447 :selected (eq 'sort-buffers-menu-by-mode-then-alphabetically
|
|
448 buffers-menu-sort-function)])
|
|
449 ["Submenus for Buffer Groups"
|
|
450 (setq buffers-menu-submenus-for-groups-p
|
|
451 (not buffers-menu-submenus-for-groups-p))
|
|
452 :style toggle
|
|
453 :selected buffers-menu-submenus-for-groups-p
|
|
454 :active (not (null buffers-menu-grouping-function))]
|
|
455 "---"
|
|
456 ["Ignore Scaled Fonts" (setq font-menu-ignore-scaled-fonts
|
|
457 (not font-menu-ignore-scaled-fonts))
|
|
458 :style toggle :selected font-menu-ignore-scaled-fonts]
|
|
459 )
|
|
460 ,@(if (featurep 'toolbar)
|
|
461 '(("Toolbar Appearance"
|
|
462 ["Visible" (set-specifier default-toolbar-visible-p
|
|
463 (not (specifier-instance
|
|
464 default-toolbar-visible-p)))
|
|
465 :style toggle
|
|
466 :selected (specifier-instance default-toolbar-visible-p)]
|
|
467 ["Captioned" (set-specifier toolbar-buttons-captioned-p
|
|
468 (not (specifier-instance
|
|
469 toolbar-buttons-captioned-p)))
|
|
470 :style toggle
|
|
471 :selected
|
|
472 (specifier-instance toolbar-buttons-captioned-p)]
|
|
473 ("Default Location"
|
|
474 ["Top" (set-default-toolbar-position 'top)
|
|
475 :style radio :selected (eq (default-toolbar-position) 'top)]
|
|
476 ["Bottom" (set-default-toolbar-position 'bottom)
|
|
477 :style radio :selected (eq (default-toolbar-position) 'bottom)]
|
|
478 ["Left" (set-default-toolbar-position 'left)
|
|
479 :style radio :selected (eq (default-toolbar-position) 'left)]
|
|
480 ["Right" (set-default-toolbar-position 'right)
|
|
481 :style radio :selected (eq (default-toolbar-position) 'right)]
|
|
482 )
|
|
483 )))
|
80
|
484 ("Mouse"
|
|
485 ["Avoid-Text"
|
|
486 (if (equal (device-type) 'x)
|
|
487 (if mouse-avoidance-mode
|
|
488 (mouse-avoidance-mode 'none)
|
|
489 (mouse-avoidance-mode 'banish))
|
|
490 (beep)
|
|
491 (message "This option requires a window system."))
|
|
492 :style toggle :selected (and mouse-avoidance-mode window-system)])
|
0
|
493 ("Open URLs With"
|
|
494 ["Emacs-W3" (setq browse-url-browser-function 'browse-url-w3)
|
|
495 :style radio
|
|
496 :selected (eq browse-url-browser-function 'browse-url-w3)]
|
|
497 ["Netscape" (setq browse-url-browser-function 'browse-url-netscape)
|
|
498 :style radio
|
|
499 :selected (eq browse-url-browser-function 'browse-url-netscape)]
|
|
500 ["Mosaic" (setq browse-url-browser-function 'browse-url-mosaic)
|
|
501 :style radio
|
|
502 :selected (eq browse-url-browser-function 'browse-url-mosaic)]
|
|
503 ["Mosaic (CCI)" (setq browse-url-browser-function 'browse-url-cci)
|
|
504 :style radio
|
|
505 :selected (eq browse-url-browser-function 'browse-url-iximosaic)]
|
|
506 ["IXI Mosaic" (setq browse-url-browser-function 'browse-url-iximosaic)
|
|
507 :style radio
|
|
508 :selected (eq browse-url-browser-function 'browse-url-iximosaic)]
|
|
509 ["Lynx (xterm)" (setq browse-url-browser-function 'browse-url-lynx-xterm)
|
|
510 :style radio
|
|
511 :selected (eq browse-url-browser-function 'browse-url-lynx-xterm)]
|
|
512 ["Lynx (xemacs)" (setq browse-url-browser-function 'browse-url-lynx-emacs)
|
|
513 :style radio
|
|
514 :selected (eq browse-url-browser-function 'browse-url-lynx-emacs)]
|
|
515 ["Grail" (setq browse-url-browser-function 'browse-url-grail)
|
|
516 :style radio
|
|
517 :selected (eq browse-url-browser-function 'browse-url-grail)]
|
|
518 )
|
|
519 "-----"
|
70
|
520 ["Edit Faces..." edit-faces t]
|
0
|
521 ("Font" :filter font-menu-family-constructor)
|
|
522 ("Size" :filter font-menu-size-constructor)
|
|
523 ("Weight" :filter font-menu-weight-constructor)
|
70
|
524 ,@(if (featurep 'mule)
|
|
525 '("-----"
|
|
526 ("Language Environment"
|
|
527 :filter language-environment-menu-filter)))
|
0
|
528 "-----"
|
|
529 ["Save Options" save-options-menu-settings t]
|
|
530 )
|
|
531
|
|
532 ("Buffers"
|
|
533 :filter buffers-menu-filter
|
|
534 ["List All Buffers" list-buffers t]
|
|
535 "--"
|
|
536 )
|
|
537
|
|
538 ("Tools"
|
|
539 ["Grep..." grep t]
|
|
540 ["Compile..." compile t]
|
6
|
541 ["Shell" shell t]
|
0
|
542 ["Shell Command..." shell-command t]
|
70
|
543 ["Shell Command on Region..." shell-command-on-region (region-exists-p)]
|
0
|
544 ["Debug (GDB)..." gdb t]
|
|
545 ["Debug (DBX)..." dbx t]
|
|
546 "-----"
|
|
547 ["OO-Browser..." oobr t]
|
|
548 ("Tags"
|
70
|
549 ["Find Tag..." find-tag t]
|
0
|
550 ["Find Other Window..." find-tag-other-window t]
|
70
|
551 ["Next Tag..." (find-tag nil) t]
|
|
552 ["Next Other Window..." (find-tag-other-window nil) t]
|
|
553 ["Next File" next-file t]
|
|
554 "-----"
|
0
|
555 ["Tags Search..." tags-search t]
|
|
556 ["Tags Replace..." tags-query-replace t]
|
70
|
557 ["Continue Search/Replace" tags-loop-continue t]
|
0
|
558 "-----"
|
|
559 ["Pop stack" pop-tag-mark t]
|
70
|
560 ["Apropos..." tags-apropos t]
|
|
561 "-----"
|
|
562 ["Set Tags Table File..." visit-tags-table t]
|
|
563 ))
|
0
|
564
|
|
565 nil ; the partition: menus after this are flushright
|
|
566
|
|
567 ("Help"
|
|
568 ["About XEmacs..." about-xemacs t]
|
76
|
569 ("Basics"
|
|
570 ["XEmacs Tutorial" help-with-tutorial t]
|
|
571 ["XEmacs News" view-emacs-news t]
|
|
572 ["Package Browser" finder-by-keyword t]
|
|
573 ["Splash Screen" xemacs-splash-buffer t])
|
0
|
574 "-----"
|
82
|
575 ("XEmacs FAQ"
|
|
576 ["XEmacs FAQ (local)" xemacs-local-faq t]
|
76
|
577 ["Newest XEmacs FAQ via WWW" xemacs-www-faq t]
|
82
|
578 ["XEmacs WWW Page" xemacs-www-page t])
|
76
|
579 ("Samples"
|
|
580 ["Sample" (find-file
|
|
581 (expand-file-name "sample.emacs"
|
|
582 data-directory))
|
|
583 t ".emacs"]
|
|
584 ["Sample" (find-file
|
|
585 (expand-file-name "sample.Xdefaults"
|
|
586 data-directory))
|
80
|
587 t ".Xdefaults"]
|
|
588 ["Sample" (find-file
|
|
589 (expand-file-name "enriched.doc"
|
|
590 data-directory))
|
|
591 t "enriched"])
|
0
|
592 "-----"
|
|
593 ("Lookup in Info"
|
70
|
594 ["Key/Mouse Binding..." Info-goto-emacs-key-command-node t]
|
0
|
595 ["Command..." Info-goto-emacs-command-node t]
|
70
|
596 ["Elisp Function..." Info-elisp-ref t]
|
0
|
597 ["Topic..." Info-query t])
|
76
|
598 ("Manuals"
|
|
599 ["Info (Detailed Docs)" info t]
|
|
600 ["Unix Manual..." manual-entry t])
|
|
601 ("Commands & Keys"
|
|
602 ["Describe Mode" describe-mode t]
|
|
603 ["Apropos..." hyper-apropos t]
|
|
604 ["Apropos Documentation..." apropos-documentation t]
|
|
605 "-----"
|
|
606 ["Describe Key/Mouse..." describe-key t]
|
|
607 ["List Key Bindings" describe-bindings t]
|
|
608 ["List Mouse Bindings" describe-pointer t]
|
82
|
609 ["Recent Keystrokes" view-lossage t]
|
76
|
610 "-----"
|
|
611 ["Describe Function..." describe-function t]
|
|
612 ["Describe Variable..." describe-variable t]
|
|
613 ["Where Is Command..." where-is t])
|
70
|
614 "-----"
|
82
|
615 ["Recent Messages" view-lossage t]
|
0
|
616 ("Misc"
|
70
|
617 ["Describe No Warranty" describe-no-warranty t]
|
|
618 ["Describe XEmacs License" describe-copying t]
|
|
619 ["Getting the Latest Version" describe-distribution t])
|
0
|
620 )
|
|
621 )))
|
|
622
|
|
623
|
|
624 (defun maybe-add-init-button ()
|
2
|
625 "Don't call this.
|
|
626 Adds `Load .emacs' button to menubar when starting up with -q."
|
0
|
627 ;; by Stig@hackvan.com
|
|
628 (cond
|
|
629 (init-file-user nil)
|
|
630 ((file-exists-p (cond
|
|
631 ((eq system-type 'ms-dos)
|
|
632 (concat "~" (user-login-name) "/_emacs"))
|
|
633 ((eq system-type 'vax-vms)
|
|
634 "sys$login:.emacs")
|
|
635 (t
|
|
636 (concat "~" (user-login-name) "/.emacs"))))
|
|
637 (add-menu-button nil
|
|
638 ["Load .emacs"
|
|
639 (progn (delete-menu-item '("Load .emacs"))
|
|
640 (load-user-init-file (user-login-name)))
|
|
641 t]
|
|
642 "Help"))
|
|
643 (t nil)))
|
|
644
|
|
645 (add-hook 'before-init-hook 'maybe-add-init-button)
|
|
646
|
|
647
|
|
648 ;;; The File and Edit menus
|
|
649
|
|
650 (defvar put-buffer-names-in-file-menu t)
|
|
651
|
|
652 ;; The sensitivity part of this function could be done by just adding forms
|
|
653 ;; to evaluate to the menu items themselves; that would be marginally less
|
|
654 ;; efficient but not perceptibly so (I think). But in order to change the
|
|
655 ;; names of the Undo menu item and the various things on the File menu item,
|
|
656 ;; we need to use a hook.
|
|
657
|
|
658 (defun file-menu-filter (menu-items)
|
|
659 "Incrementally update the file menu.
|
|
660 This function changes the arguments and sensitivity of these File menu items:
|
|
661
|
|
662 Delete Buffer has the name of the current buffer appended to it.
|
|
663 Print Buffer has the name of the current buffer appended to it.
|
|
664 Pretty-Print Buffer
|
|
665 has the name of the current buffer appended to it.
|
|
666 Save has the name of the current buffer appended to it, and is
|
|
667 sensitive only when the current buffer is modified.
|
|
668 Revert Buffer has the name of the current buffer appended to it, and is
|
|
669 sensitive only when the current buffer has a file.
|
|
670 Delete Frame sensitive only when there is more than one frame.
|
|
671
|
|
672 The name of the current buffer is only appended to the menu items if
|
|
673 `put-buffer-names-in-file-menu' is non-nil. This behavior is the default."
|
|
674 (let* ((bufname (buffer-name))
|
|
675 (result menu-items) ; save pointer to start of menu.
|
|
676 name
|
|
677 item)
|
|
678 ;; the contents of the menu items in the file menu are destructively
|
|
679 ;; modified so that there is as little consing as possible. This is okay.
|
|
680 ;; As soon as the result is returned, it is converted to widget_values
|
|
681 ;; inside lwlib and the lisp menu-items can be safely modified again.
|
|
682 (while (setq item (pop menu-items))
|
|
683 (if (vectorp item)
|
|
684 (progn
|
|
685 (setq name (aref item 0))
|
|
686 (and put-buffer-names-in-file-menu
|
|
687 (member name '("Save" "Revert Buffer" "Print Buffer"
|
|
688 "Pretty-Print Buffer" "Delete Buffer"))
|
|
689 (>= 4 (length item))
|
|
690 (aset item 3 bufname))
|
|
691 (and (string= "Save" name)
|
|
692 (aset item 2 (buffer-modified-p)))
|
|
693 (and (string= "Revert Buffer" name)
|
|
694 (aset item 2 (not (not (or buffer-file-name
|
|
695 revert-buffer-function)))))
|
|
696 (and (string= "Delete Frame" name)
|
|
697 (aset item 2 (not (eq (next-frame) (selected-frame)))))
|
|
698 )))
|
|
699 result))
|
|
700
|
|
701 (defun edit-menu-filter (menu-items)
|
|
702 "For use as an incremental menu construction filter.
|
|
703 This function changes the sensitivity of these Edit menu items:
|
|
704
|
|
705 Cut sensitive only when emacs owns the primary X Selection.
|
|
706 Copy sensitive only when emacs owns the primary X Selection.
|
|
707 Clear sensitive only when emacs owns the primary X Selection.
|
|
708 Paste sensitive only when there is an owner for the X Clipboard Selection.
|
|
709 Undo sensitive only when there is undo information.
|
|
710 While in the midst of an undo, this is changed to \"Undo More\"."
|
|
711 (let* (item
|
|
712 name
|
|
713 (result menu-items) ; save pointer to head of list
|
|
714 (x-dev (eq 'x (device-type (selected-device))))
|
|
715 (emacs-owns-selection-p (and x-dev (x-selection-owner-p)))
|
|
716 (clipboard-exists-p (and x-dev (x-selection-exists-p 'CLIPBOARD)))
|
|
717 ;;; undo-available undoing-more
|
|
718 ;;; (undo-info-available (not (null (and (not (eq t buffer-undo-list))
|
|
719 ;;; (if (eq last-command 'undo)
|
|
720 ;;; (setq undoing-more
|
|
721 ;;; (and (boundp 'pending-undo-list)
|
|
722 ;;; pending-undo-list)
|
|
723 ;;; buffer-undo-list))))))
|
|
724 undo-name undo-state
|
|
725 )
|
|
726 ;; As with file-menu-filter, menu-items are destructively modified.
|
|
727 ;; This is OK.
|
|
728 (while (setq item (pop menu-items))
|
|
729 (if (vectorp item)
|
|
730 (progn
|
|
731 (setq name (aref item 0))
|
|
732 (and (member name '("Cut" "Copy" "Clear"))
|
|
733 (aset item 2 emacs-owns-selection-p))
|
|
734 (and (string= name "Paste")
|
|
735 (aset item 2 clipboard-exists-p))
|
|
736 (and (member name '("Undo" "Undo More"))
|
|
737 (progn
|
|
738 ;; we could also do this with the third field of the item.
|
|
739 (if (eq last-command 'undo)
|
|
740 (setq undo-name "Undo More"
|
|
741 undo-state (not (null (and (boundp 'pending-undo-list)
|
|
742 pending-undo-list))))
|
|
743 (setq undo-name "Undo"
|
|
744 undo-state (and (not (eq buffer-undo-list t))
|
|
745 (not (null
|
|
746 (or buffer-undo-list
|
|
747 (and (boundp 'pending-undo-list)
|
|
748 pending-undo-list)))))))
|
|
749 (if buffer-read-only (setq undo-state nil))
|
|
750 (aset item 0 undo-name)
|
|
751 (aset item 2 undo-state)
|
|
752 ))
|
|
753 )))
|
|
754 result))
|
|
755
|
|
756
|
|
757 ;;; The Buffers menu
|
|
758
|
|
759 (defvar buffers-menu-max-size 25
|
|
760 "*Maximum number of entries which may appear on the \"Buffers\" menu.
|
|
761 If this is 10, then only the ten most-recently-selected buffers will be
|
|
762 shown. If this is nil, then all buffers will be shown. Setting this to
|
|
763 a large number or nil will slow down menu responsiveness.")
|
|
764
|
|
765 (defvar complex-buffers-menu-p nil
|
|
766 "*If true, the buffers menu will contain several commands, as submenus
|
|
767 of each buffer line. If this is false, then there will be only one command:
|
|
768 select that buffer.")
|
|
769
|
|
770 (defvar buffers-menu-submenus-for-groups-p nil
|
|
771 "*If true, the buffers menu will contain one submenu per group of buffers,
|
74
|
772 if a grouping function is specified in `buffers-menu-grouping-function'.
|
|
773 If this is an integer, do not build submenus if the number of buffers
|
|
774 is not larger than this value.")
|
0
|
775
|
|
776 (defvar buffers-menu-switch-to-buffer-function 'switch-to-buffer
|
|
777 "*The function to call to select a buffer from the buffers menu.
|
|
778 `switch-to-buffer' is a good choice, as is `pop-to-buffer'.")
|
|
779
|
|
780 (defvar buffers-menu-omit-function 'buffers-menu-omit-invisible-buffers
|
|
781 "*If non-nil, a function specifying the buffers to omit from the buffers menu.
|
|
782 This is passed a buffer and should return non-nil if the buffer should be
|
|
783 omitted. The default value `buffers-menu-omit-invisible-buffers' omits
|
|
784 buffers that are normally considered \"invisible\" (those whose name
|
|
785 begins with a space).")
|
|
786
|
|
787 (defvar buffers-menu-format-buffer-line-function 'format-buffers-menu-line
|
|
788 "*The function to call to return a string to represent a buffer in the
|
|
789 buffers menu. The function is passed a buffer and should return a string.
|
|
790 The default value `format-buffers-menu-line' just returns the name of
|
|
791 the buffer. Also check out `slow-format-buffers-menu-line' which
|
|
792 returns a whole bunch of info about a buffer.")
|
|
793
|
|
794 (defvar buffers-menu-sort-function
|
|
795 'sort-buffers-menu-by-mode-then-alphabetically
|
|
796 "*If non-nil, a function to sort the list of buffers in the buffers menu.
|
|
797 It will be passed two arguments (two buffers to compare) and should return
|
|
798 T if the first is \"less\" than the second. One possible value is
|
|
799 `sort-buffers-menu-alphabetically'; another is
|
|
800 `sort-buffers-menu-by-mode-then-alphabetically'.")
|
|
801
|
|
802 (defvar buffers-menu-grouping-function
|
|
803 'group-buffers-menu-by-mode-then-alphabetically
|
|
804 "*If non-nil, a function to group buffers in the buffers menu together.
|
|
805 It will be passed two arguments, successive members of the sorted buffers
|
|
806 list after being passed through `buffers-menu-sort-function'. It should
|
|
807 return non-nil if the second buffer begins a new group. The return value
|
|
808 should be the name of the old group, which may be used in hierarchical
|
|
809 buffers menus. The last invocation of the function contains nil as the
|
|
810 second argument, so that the name of the last group can be determined.
|
|
811
|
|
812 The sensible values of this function are dependent on the value specified
|
|
813 for `buffers-menu-sort-function'.")
|
|
814
|
|
815 (defun buffers-menu-omit-invisible-buffers (buf)
|
|
816 "For use as a value of `buffers-menu-omit-function'.
|
|
817 Omits normally invisible buffers (those whose name begins with a space)."
|
|
818 (not (null (string-match "\\` " (buffer-name buf)))))
|
|
819
|
|
820 (defun sort-buffers-menu-alphabetically (buf1 buf2)
|
|
821 "For use as a value of `buffers-menu-sort-function'.
|
|
822 Sorts the buffers in alphabetical order by name, but puts buffers beginning
|
|
823 with a star at the end of the list."
|
|
824 (let* ((nam1 (buffer-name buf1))
|
|
825 (nam2 (buffer-name buf2))
|
|
826 (star1p (not (null (string-match "\\`*" nam1))))
|
|
827 (star2p (not (null (string-match "\\`*" nam2)))))
|
|
828 (if (not (eq star1p star2p))
|
|
829 (not star1p)
|
|
830 (string-lessp nam1 nam2))))
|
|
831
|
|
832 (defun sort-buffers-menu-by-mode-then-alphabetically (buf1 buf2)
|
|
833 "For use as a value of `buffers-menu-sort-function'.
|
|
834 Sorts first by major mode and then alphabetically by name, but puts buffers
|
|
835 beginning with a star at the end of the list."
|
|
836 (let* ((nam1 (buffer-name buf1))
|
|
837 (nam2 (buffer-name buf2))
|
|
838 (star1p (not (null (string-match "\\`*" nam1))))
|
|
839 (star2p (not (null (string-match "\\`*" nam2))))
|
|
840 (mode1 (symbol-value-in-buffer 'major-mode buf1))
|
|
841 (mode2 (symbol-value-in-buffer 'major-mode buf2)))
|
|
842 (cond ((not (eq star1p star2p)) (not star1p))
|
|
843 ((and star1p star2p (string-lessp nam1 nam2)))
|
|
844 ((string-lessp mode1 mode2) t)
|
|
845 ((string-lessp mode2 mode1) nil)
|
|
846 (t (string-lessp nam1 nam2)))))
|
|
847
|
|
848 ;; this version is too slow on some machines.
|
|
849 (defun slow-format-buffers-menu-line (buffer)
|
|
850 "For use as a value of `buffers-menu-format-buffer-line-function'.
|
|
851 This returns a string containing a bunch of info about the buffer."
|
|
852 (format "%s%s %-19s %6s %-15s %s"
|
|
853 (if (buffer-modified-p buffer) "*" " ")
|
|
854 (if (symbol-value-in-buffer 'buffer-read-only buffer) "%" " ")
|
|
855 (buffer-name buffer)
|
|
856 (buffer-size buffer)
|
|
857 (symbol-value-in-buffer 'mode-name buffer)
|
|
858 (or (buffer-file-name buffer) "")))
|
|
859
|
|
860 (defun format-buffers-menu-line (buffer)
|
|
861 "For use as a value of `buffers-menu-format-buffer-line-function'.
|
|
862 This just returns the buffer's name."
|
|
863 (buffer-name buffer))
|
|
864
|
|
865 (defun group-buffers-menu-by-mode-then-alphabetically (buf1 buf2)
|
|
866 "For use as a value of `buffers-menu-grouping-function'.
|
|
867 This groups buffers by major mode. It only really makes sense if
|
|
868 `buffers-menu-sorting-function' is
|
|
869 `sort-buffers-menu-by-mode-then-alphabetically'."
|
|
870 (cond ((string-match "\\`*" (buffer-name buf1))
|
|
871 (and (null buf2) "*Misc*"))
|
|
872 ((or (null buf2)
|
|
873 (string-match "\\`*" (buffer-name buf2))
|
|
874 (not (eq (symbol-value-in-buffer 'major-mode buf1)
|
|
875 (symbol-value-in-buffer 'major-mode buf2))))
|
|
876 (symbol-value-in-buffer 'mode-name buf1))
|
|
877 (t nil)))
|
|
878
|
|
879 (defun buffer-menu-save-buffer (buffer)
|
|
880 (save-excursion
|
|
881 (set-buffer buffer)
|
|
882 (save-buffer)))
|
|
883
|
|
884 (defun buffer-menu-write-file (buffer)
|
|
885 (save-excursion
|
|
886 (set-buffer buffer)
|
|
887 (write-file (read-file-name
|
|
888 (format "Write %s to file: "
|
|
889 (buffer-name (current-buffer)))))))
|
|
890
|
|
891 (defsubst build-buffers-menu-internal (buffers)
|
|
892 (let (name line)
|
|
893 (mapcar
|
74
|
894 #'(lambda (buffer)
|
|
895 (if (eq buffer t)
|
|
896 "---"
|
|
897 (setq line (funcall buffers-menu-format-buffer-line-function
|
|
898 buffer))
|
|
899 (if complex-buffers-menu-p
|
|
900 (delq nil
|
|
901 (list line
|
|
902 (vector "Switch to Buffer"
|
|
903 (list buffers-menu-switch-to-buffer-function
|
|
904 (setq name (buffer-name buffer)))
|
|
905 t)
|
|
906 (if (eq buffers-menu-switch-to-buffer-function
|
|
907 'switch-to-buffer)
|
|
908 (vector "Switch to Buffer, Other Frame"
|
|
909 (list 'switch-to-buffer-other-frame
|
|
910 (setq name (buffer-name buffer)))
|
|
911 t)
|
|
912 nil)
|
|
913 (if (and (buffer-modified-p buffer)
|
|
914 (buffer-file-name buffer))
|
|
915 (vector "Save Buffer"
|
|
916 (list 'buffer-menu-save-buffer name) t)
|
|
917 ["Save Buffer" nil nil]
|
|
918 )
|
|
919 (vector "Save As..."
|
|
920 (list 'buffer-menu-write-file name) t)
|
|
921 (vector "Delete Buffer" (list 'kill-buffer name)
|
|
922 t)))
|
|
923 ;; ### We don't want buffer names to be translated,
|
|
924 ;; ### so we put the buffer name in the suffix.
|
|
925 ;; ### Also, avoid losing with non-ASCII buffer names.
|
|
926 ;; ### We still lose, however, if complex-buffers-menu-p. --mrb
|
|
927 (vector ""
|
|
928 (list buffers-menu-switch-to-buffer-function
|
|
929 (buffer-name buffer))
|
|
930 t line))))
|
0
|
931 buffers)))
|
|
932
|
|
933 (defun buffers-menu-filter (menu)
|
|
934 "This is the menu filter for the top-level buffers \"Buffers\" menu.
|
|
935 It dynamically creates a list of buffers to use as the contents of the menu.
|
|
936 Only the most-recently-used few buffers will be listed on the menu, for
|
|
937 efficiency reasons. You can control how many buffers will be shown by
|
|
938 setting `buffers-menu-max-size'. You can control the text of the menu
|
|
939 items by redefining the function `format-buffers-menu-line'."
|
|
940 (let ((buffers (delete-if buffers-menu-omit-function (buffer-list))))
|
|
941 (and (integerp buffers-menu-max-size)
|
|
942 (> buffers-menu-max-size 1)
|
|
943 (> (length buffers) buffers-menu-max-size)
|
74
|
944 ;; shorten list of buffers (not with submenus!)
|
|
945 (not (and buffers-menu-grouping-function
|
|
946 buffers-menu-submenus-for-groups-p))
|
0
|
947 (setcdr (nthcdr buffers-menu-max-size buffers) nil))
|
|
948 (if buffers-menu-sort-function
|
|
949 (setq buffers (sort buffers buffers-menu-sort-function)))
|
|
950 (if (and buffers-menu-grouping-function
|
74
|
951 buffers-menu-submenus-for-groups-p
|
|
952 (or (not (integerp buffers-menu-submenus-for-groups-p))
|
|
953 (> (length buffers) buffers-menu-submenus-for-groups-p)))
|
0
|
954 (let (groups groupnames current-group)
|
|
955 (mapl
|
|
956 #'(lambda (sublist)
|
|
957 (let ((groupname (funcall buffers-menu-grouping-function
|
|
958 (car sublist) (cadr sublist))))
|
|
959 (setq current-group (cons (car sublist) current-group))
|
|
960 (if groupname
|
|
961 (progn
|
|
962 (setq groups (cons (nreverse current-group)
|
|
963 groups))
|
|
964 (setq groupnames (cons groupname groupnames))
|
|
965 (setq current-group nil)))))
|
|
966 buffers)
|
|
967 (setq buffers
|
|
968 (mapcar*
|
|
969 #'(lambda (groupname group)
|
|
970 (cons groupname (build-buffers-menu-internal group)))
|
|
971 (nreverse groupnames)
|
|
972 (nreverse groups))))
|
|
973 (if buffers-menu-grouping-function
|
|
974 (progn
|
|
975 (setq buffers
|
|
976 (mapcon
|
|
977 #'(lambda (sublist)
|
|
978 (cond ((funcall buffers-menu-grouping-function
|
|
979 (car sublist) (cadr sublist))
|
|
980 (list (car sublist) t))
|
|
981 (t (list (car sublist)))))
|
|
982 buffers))
|
|
983 ;; remove a trailing separator.
|
|
984 (and (>= (length buffers) 2)
|
|
985 (let ((lastcdr (nthcdr (- (length buffers) 2) buffers)))
|
|
986 (if (eq t (cadr lastcdr))
|
|
987 (setcdr lastcdr nil))))))
|
|
988 (setq buffers (build-buffers-menu-internal buffers)))
|
|
989 (append menu buffers)
|
|
990 ))
|
|
991
|
70
|
992 (defun language-environment-menu-filter (menu)
|
|
993 "This is the menu filter for the \"Language Environment\" submenu."
|
|
994 (mapcar (lambda (env-sym)
|
|
995 `[ ,(capitalize (symbol-name env-sym))
|
|
996 (set-language-environment ',env-sym) t])
|
|
997 language-environment-list))
|
0
|
998
|
|
999
|
|
1000 ;;; The Options menu
|
|
1001
|
|
1002 (defconst options-menu-saved-forms
|
|
1003 ;; This is really quite a kludge, but it gets the job done.
|
|
1004 ;;
|
|
1005 ;; remember that we have to conditionalize on default features
|
|
1006 ;; both in the forms to evaluate and in the forms output to
|
|
1007 ;; .emacs, in case the .emacs is loaded into an XEmacs with
|
|
1008 ;; different features.
|
|
1009 (purecopy
|
|
1010 '(
|
|
1011 ;; Editing Options menu.
|
|
1012 ;; put case-fold-search first to defeat a bug in the backquote
|
|
1013 ;; processing mechanism. Feh!
|
|
1014 case-fold-search
|
|
1015 `(setq-default overwrite-mode ,(default-value 'overwrite-mode))
|
|
1016 (if (default-value 'overwrite-mode)
|
|
1017 '(overwrite-mode 1))
|
|
1018 `(setq-default case-fold-search ,(default-value 'case-fold-search))
|
|
1019 case-replace
|
|
1020 (if (memq 'pending-delete-pre-hook pre-command-hook)
|
|
1021 '(progn
|
|
1022 (require 'pending-del)
|
|
1023 (pending-delete-on nil)))
|
|
1024 zmacs-regions
|
|
1025 mouse-yank-at-point
|
78
|
1026 require-final-newline
|
|
1027 next-line-add-newlines
|
0
|
1028
|
|
1029 ;; General Options menu.
|
|
1030 teach-extended-commands-p
|
|
1031 ;; (#### not actually on Options menu)
|
|
1032 teach-extended-commands-timeout
|
|
1033 debug-on-error
|
|
1034 debug-on-quit
|
|
1035
|
|
1036 ;; Printing Options menu.
|
|
1037 lpr-switches
|
|
1038 ps-print-color-p
|
|
1039 ps-paper-type
|
|
1040
|
|
1041 ;; Other Window Location
|
|
1042 get-frame-for-buffer-default-instance-limit
|
|
1043 temp-buffer-show-function
|
78
|
1044 (if gnuserv-frame
|
|
1045 '(setq gnuserv-frame (selected-frame)))
|
0
|
1046
|
|
1047 ;; Syntax Highlighting
|
|
1048 font-lock-auto-fontify
|
|
1049 font-lock-use-fonts
|
|
1050 font-lock-use-colors
|
|
1051 font-lock-maximum-decoration
|
|
1052 font-lock-maximum-size
|
|
1053 ;; (#### the next two not on Options menu)
|
|
1054 font-lock-mode-enable-list
|
|
1055 font-lock-mode-disable-list
|
|
1056 ;; #### - this structure is clearly broken. There's no way to ever
|
|
1057 ;; un-require font-lock via the menus. --Stig
|
|
1058 (if (featurep 'font-lock)
|
|
1059 '(require 'font-lock))
|
|
1060 (if (and (boundp 'font-lock-mode-hook)
|
|
1061 (memq 'turn-on-fast-lock font-lock-mode-hook))
|
|
1062 '(add-hook 'font-lock-mode-hook 'turn-on-fast-lock)
|
|
1063 '(remove-hook 'font-lock-mode-hook 'turn-on-fast-lock))
|
|
1064 (if (and (boundp 'font-lock-mode-hook)
|
|
1065 (memq 'turn-on-lazy-lock font-lock-mode-hook))
|
|
1066 '(add-hook 'font-lock-mode-hook 'turn-on-lazy-lock)
|
|
1067 '(remove-hook 'font-lock-mode-hook 'turn-on-lazy-lock))
|
|
1068
|
|
1069 ;; Paren Highlighting
|
|
1070 (if paren-mode
|
|
1071 `(progn (require 'paren) (paren-set-mode ',paren-mode)))
|
|
1072
|
|
1073 ;; For specifiers, we only save global settings since the others
|
|
1074 ;; will belong to objects which only exist during this session.
|
|
1075
|
|
1076 ;; Frame Appearance
|
|
1077 (if (featurep 'scrollbar)
|
|
1078 `(if (featurep 'scrollbar)
|
|
1079 (progn
|
|
1080 (add-spec-list-to-specifier
|
|
1081 scrollbar-width
|
|
1082 ',(specifier-spec-list scrollbar-width 'global))
|
|
1083 (add-spec-list-to-specifier
|
|
1084 scrollbar-height
|
|
1085 ',(specifier-spec-list scrollbar-height 'global)))))
|
|
1086 `(add-spec-list-to-specifier
|
|
1087 modeline-shadow-thickness
|
|
1088 ',(specifier-spec-list modeline-shadow-thickness 'global))
|
|
1089 `(setq-default truncate-lines ,(default-value 'truncate-lines))
|
|
1090 bar-cursor
|
|
1091 (if (and (boundp 'blink-cursor-mode) blink-cursor-mode)
|
|
1092 '(blink-cursor-mode t))
|
|
1093
|
|
1094 ;; Menubar Appearance
|
|
1095 buffers-menu-max-size
|
|
1096 complex-buffers-menu-p
|
|
1097 buffers-menu-sort-function
|
|
1098 buffers-menu-grouping-function
|
|
1099 buffers-menu-submenus-for-groups-p
|
|
1100 font-menu-ignore-scaled-fonts
|
|
1101 font-menu-this-frame-only-p
|
|
1102
|
|
1103 ;; Toolbar Appearance
|
|
1104 (if (featurep 'toolbar)
|
|
1105 `(if (featurep 'toolbar)
|
|
1106 (progn
|
|
1107 (set-default-toolbar-position
|
|
1108 ',(default-toolbar-position))
|
|
1109 (add-spec-list-to-specifier
|
|
1110 default-toolbar-visible-p
|
|
1111 ',(specifier-spec-list default-toolbar-visible-p 'global))
|
|
1112 (add-spec-list-to-specifier
|
|
1113 toolbar-buttons-captioned-p
|
|
1114 ',(specifier-spec-list toolbar-buttons-captioned-p
|
|
1115 'global)))))
|
|
1116
|
80
|
1117 ;; mouse
|
|
1118 mouse-avoidance-mode
|
|
1119
|
0
|
1120 ;; Open URLs With
|
|
1121 browse-url-browser-function
|
|
1122
|
|
1123 ;; Now save all faces.
|
|
1124
|
|
1125 ;; Setting this in lisp conflicts with X resources. Bad move. --Stig
|
|
1126 ;; (list 'set-face-font ''default (face-font-name 'default))
|
|
1127 ;; (list 'set-face-font ''modeline (face-font-name 'modeline))
|
70
|
1128
|
|
1129 (cons 'progn
|
|
1130 (mapcar #'(lambda (face)
|
|
1131 `(make-face ',face))
|
|
1132 (face-list)))
|
|
1133
|
|
1134 (cons 'progn
|
|
1135 (apply 'nconc
|
|
1136 (mapcar
|
|
1137 #'(lambda (face)
|
|
1138 (delq nil
|
|
1139 (mapcar
|
|
1140 #'(lambda (property)
|
|
1141 (if (specifier-spec-list
|
|
1142 (face-property face property))
|
|
1143 `(add-spec-list-to-specifier
|
|
1144 (face-property ',face ',property)
|
|
1145 ',(save-options-specifier-spec-list
|
|
1146 face property))))
|
74
|
1147 (delq 'display-table
|
|
1148 (copy-sequence
|
|
1149 built-in-face-specifiers)))))
|
70
|
1150 (face-list))))
|
|
1151
|
|
1152 ;; Mule-specific:
|
|
1153 (if (featurep 'mule)
|
|
1154 `(if (featurep 'mule)
|
|
1155 (set-language-environment ',(current-language-environment))))
|
0
|
1156 ))
|
|
1157 "The variables to save; or forms to evaluate to get forms to write out.
|
|
1158 This is used by `save-options-menu-settings' and should mirror the
|
|
1159 options listed in the Options menu.")
|
|
1160
|
|
1161 (defun save-options-specifier-spec-list (face property)
|
|
1162 (if (not (or (eq property 'font) (eq property 'color)))
|
|
1163 (specifier-spec-list (face-property face property) 'global)
|
|
1164 (let* ((retlist (specifier-spec-list (face-property face property)
|
|
1165 'global))
|
|
1166 (entry (cdr (car retlist)))
|
|
1167 item)
|
|
1168 (while entry
|
|
1169 (setq item (car entry))
|
|
1170 (if (eq property 'font)
|
|
1171 (if (font-instance-p (cdr item))
|
|
1172 (setcdr item (font-instance-name (cdr item))))
|
|
1173 (if (color-instance-p (cdr item))
|
|
1174 (setcdr item (color-instance-name (cdr item)))))
|
|
1175 (setq entry (cdr entry)))
|
|
1176 retlist)))
|
|
1177
|
|
1178 (defvar save-options-init-file nil
|
|
1179 "File into which to save forms to load the options file (nil for .emacs).
|
|
1180 Normally this is nil, which means save into your .emacs file (the value
|
|
1181 of `user-init-file'.")
|
|
1182
|
|
1183 (defvar save-options-file ".xemacs-options"
|
|
1184 "File to save options into.
|
|
1185 This file is loaded from your .emacs file.
|
|
1186 If this is a relative filename, it is put into the same directory as your
|
|
1187 .emacs file.")
|
|
1188
|
|
1189 (defun save-options-menu-settings ()
|
|
1190 "Saves the current settings of the `Options' menu to your `.emacs' file."
|
|
1191 (interactive)
|
|
1192 ;; we compute the actual filenames now because x-menubar is loaded
|
|
1193 ;; at dump time, when the identity of the user running XEmacs is not known.
|
|
1194 (let* ((actual-save-options-init-file
|
|
1195 (or save-options-init-file
|
|
1196 (and (not (equal user-init-file ""))
|
|
1197 user-init-file)
|
|
1198 (and (eq system-type 'ms-dos)
|
|
1199 (concat "~" (user-login-name) "/_emacs"))
|
|
1200 (concat "~" (user-login-name) "/.emacs")))
|
|
1201 (actual-save-options-file
|
|
1202 (abbreviate-file-name
|
|
1203 (expand-file-name
|
|
1204 save-options-file
|
|
1205 (file-name-directory actual-save-options-init-file))
|
2
|
1206 ;; Don't hack-homedir in abbreviate-file-name. This will
|
|
1207 ;; cause an incorrect expansion if the save-options variables
|
|
1208 ;; have ~ in them.
|
|
1209 ))
|
0
|
1210 (init-output-buffer (find-file-noselect
|
|
1211 actual-save-options-init-file))
|
|
1212 init-output-marker
|
|
1213 (options-output-buffer
|
|
1214 (find-file-noselect actual-save-options-file))
|
|
1215 options-output-marker)
|
|
1216
|
|
1217 (save-excursion
|
|
1218 (set-buffer options-output-buffer)
|
|
1219 (erase-buffer)
|
|
1220 (setq options-output-marker (point-marker)))
|
|
1221
|
|
1222 ;; run with current-buffer unchanged so that variables are evaluated in
|
|
1223 ;; the current context, instead of in the context of the ".emacs" buffer
|
|
1224 ;; or the ".xemacs-options" buffer.
|
|
1225
|
|
1226 ;; first write out .xemacs-options.
|
|
1227
|
|
1228 (let ((standard-output options-output-marker))
|
|
1229 (princ ";; -*- Mode: Emacs-Lisp -*-\n\n")
|
|
1230 (princ "(setq options-file-xemacs-version '(")
|
|
1231 (princ emacs-major-version)
|
|
1232 (princ " ")
|
|
1233 (princ emacs-minor-version)
|
|
1234 (princ "))\n")
|
|
1235 (let ((print-readably t)
|
|
1236 (print-escape-newlines t))
|
|
1237 (mapcar #'(lambda (var)
|
|
1238 (princ " ")
|
|
1239 (if (symbolp var)
|
|
1240 (prin1 (list 'setq-default var
|
|
1241 (let ((val (symbol-value var)))
|
|
1242 (if (or (memq val '(t nil))
|
|
1243 (and (not (symbolp val))
|
|
1244 (not (consp val))))
|
|
1245 val
|
|
1246 (list 'quote val)))))
|
|
1247 (setq var (eval var))
|
|
1248 (cond ((eq (car-safe var) 'progn)
|
|
1249 (while (setq var (cdr var))
|
|
1250 (prin1 (car var))
|
|
1251 (princ "\n")
|
|
1252 (if (cdr var) (princ " "))
|
|
1253 ))
|
|
1254 (var
|
|
1255 (prin1 var))))
|
|
1256 (if var (princ "\n")))
|
|
1257 options-menu-saved-forms)
|
|
1258 ))
|
|
1259 (set-marker options-output-marker nil)
|
|
1260 (save-excursion
|
|
1261 (set-buffer options-output-buffer)
|
|
1262 (save-buffer))
|
|
1263
|
|
1264 ;; then fix .emacs.
|
|
1265
|
|
1266 (save-excursion
|
|
1267 (set-buffer init-output-buffer)
|
|
1268 ;;
|
|
1269 ;; Find and delete the previously saved data, and position to write.
|
|
1270 ;;
|
|
1271 (goto-char (point-min))
|
|
1272 (if (re-search-forward "^;; Options Menu Settings *\n" nil 'move)
|
|
1273 (let ((p (match-beginning 0)))
|
|
1274 (goto-char p)
|
|
1275 (or (re-search-forward
|
|
1276 "^;; End of Options Menu Settings *\\(\n\\|\\'\\)"
|
|
1277 nil t)
|
|
1278 (error "can't find END of saved state in .emacs"))
|
|
1279 (delete-region p (match-end 0)))
|
|
1280 (goto-char (point-max))
|
|
1281 (insert "\n"))
|
|
1282 (setq init-output-marker (point-marker)))
|
|
1283
|
|
1284 (let ((standard-output init-output-marker))
|
|
1285 (princ ";; Options Menu Settings\n")
|
|
1286 (princ ";; =====================\n")
|
|
1287 (princ "(cond\n")
|
|
1288 (princ " ((and (string-match \"XEmacs\" emacs-version)\n")
|
|
1289 (princ " (boundp 'emacs-major-version)\n")
|
|
1290 (princ " (or (and\n")
|
|
1291 (princ " (= emacs-major-version 19)\n")
|
|
1292 (princ " (>= emacs-minor-version 14))\n")
|
|
1293 (princ " (= emacs-major-version 20))\n")
|
|
1294 (princ " (fboundp 'load-options-file))\n")
|
|
1295 (princ " (load-options-file \"")
|
|
1296 (princ actual-save-options-file)
|
|
1297 (princ "\")))\n")
|
|
1298 (princ ";; ============================\n")
|
|
1299 (princ ";; End of Options Menu Settings\n"))
|
|
1300
|
|
1301 (set-marker init-output-marker nil)
|
|
1302 (save-excursion
|
|
1303 (set-buffer init-output-buffer)
|
|
1304 (save-buffer))
|
|
1305 ))
|
|
1306
|
|
1307
|
|
1308 (set-menubar default-menubar)
|
|
1309
|
|
1310
|
|
1311 ;;; Popup menus.
|
|
1312
|
|
1313 (defconst default-popup-menu
|
|
1314 '("XEmacs Commands"
|
|
1315 :filter edit-menu-filter
|
|
1316 ["Undo" advertised-undo t]
|
|
1317 ["Cut" x-kill-primary-selection t]
|
|
1318 ["Copy" x-copy-primary-selection t]
|
|
1319 ["Paste" x-yank-clipboard-selection t]
|
|
1320 ["Clear" x-delete-primary-selection t]
|
|
1321 "-----"
|
|
1322 ["Select Block" mark-paragraph t]
|
|
1323 ["Split Window" (split-window) t]
|
|
1324 ["Unsplit Window" delete-other-windows t]
|
|
1325 ))
|
|
1326
|
|
1327 (defvar global-popup-menu nil
|
|
1328 "The global popup menu. This is present in all modes.
|
|
1329 See the function `popup-menu' for a description of menu syntax.")
|
|
1330
|
|
1331 (defvar mode-popup-menu nil
|
|
1332 "The mode-specific popup menu. Automatically buffer local.
|
|
1333 This is appended to the default items in `global-popup-menu'.
|
|
1334 See the function `popup-menu' for a description of menu syntax.")
|
|
1335 (make-variable-buffer-local 'mode-popup-menu)
|
|
1336
|
|
1337 ;; In an effort to avoid massive menu clutter, this mostly worthless menu is
|
|
1338 ;; superceded by any local popup menu...
|
|
1339 (setq-default mode-popup-menu default-popup-menu)
|
|
1340
|
|
1341 (defvar activate-popup-menu-hook nil
|
|
1342 "Function or functions run before a mode-specific popup menu is made visible.
|
|
1343 These functions are called with no arguments, and should interrogate and
|
|
1344 modify the value of `global-popup-menu' or `mode-popup-menu' as desired.
|
|
1345 Note: this hook is only run if you use `popup-mode-menu' for activating the
|
|
1346 global and mode-specific commands; if you have your own binding for button3,
|
|
1347 this hook won't be run.")
|
|
1348
|
|
1349 (defun popup-mode-menu ()
|
|
1350 "Pop up a menu of global and mode-specific commands.
|
|
1351 The menu is computed by combining `global-popup-menu' and `mode-popup-menu'."
|
|
1352 (interactive "@_")
|
|
1353 (run-hooks 'activate-popup-menu-hook)
|
|
1354 (popup-menu
|
|
1355 (cond ((and global-popup-menu mode-popup-menu)
|
|
1356 (check-menu-syntax mode-popup-menu)
|
70
|
1357 (let ((title (car mode-popup-menu))
|
|
1358 (items (cdr mode-popup-menu)))
|
|
1359 (append global-popup-menu
|
0
|
1360 '("---" "---")
|
|
1361 (if popup-menu-titles (list title))
|
|
1362 (if popup-menu-titles '("---" "---"))
|
|
1363 items)))
|
|
1364 (t
|
|
1365 (or mode-popup-menu
|
|
1366 global-popup-menu
|
|
1367 (error "No menu here."))))))
|
|
1368
|
|
1369 (defun popup-buffer-menu (event)
|
|
1370 "Pop up a copy of the Buffers menu (from the menubar) where the mouse is clicked."
|
|
1371 (interactive "e")
|
|
1372 (let ((window (and (event-over-text-area-p event) (event-window event)))
|
|
1373 (bmenu nil))
|
|
1374 (or window
|
|
1375 (error "Pointer must be in a normal window"))
|
|
1376 (select-window window)
|
|
1377 (if current-menubar
|
|
1378 (setq bmenu (assoc "Buffers" current-menubar)))
|
|
1379 (if (null bmenu)
|
|
1380 (setq bmenu (assoc "Buffers" default-menubar)))
|
|
1381 (if (null bmenu)
|
|
1382 (error "Can't find the Buffers menu"))
|
|
1383 (popup-menu bmenu)))
|
|
1384
|
|
1385 (defun popup-menubar-menu (event)
|
|
1386 "Pop up a copy of menu that also appears in the menubar"
|
|
1387 ;; by Stig@hackvan.com
|
|
1388 (interactive "e")
|
|
1389 (let ((window (and (event-over-text-area-p event) (event-window event)))
|
|
1390 popup-menubar)
|
|
1391 (or window
|
|
1392 (error "Pointer must be in a normal window"))
|
|
1393 (select-window window)
|
|
1394 (and current-menubar (run-hooks 'activate-menubar-hook))
|
|
1395 ;; ##### Instead of having to copy this just to safely get rid of
|
|
1396 ;; any nil what we should really do is fix up the internal menubar
|
|
1397 ;; code to just ignore nil if generating a popup menu
|
|
1398 (setq popup-menubar (delete nil (copy-sequence (or current-menubar
|
|
1399 default-menubar))))
|
|
1400 (popup-menu (cons "Menubar Menu" popup-menubar))
|
|
1401 ))
|
|
1402
|
|
1403 (global-set-key 'button3 'popup-mode-menu)
|
|
1404 ;; shift button3 and shift button2 are reserved for Hyperbole
|
|
1405 (global-set-key '(meta control button3) 'popup-buffer-menu)
|
|
1406 (global-set-key '(meta shift button3) 'popup-menubar-menu)
|
|
1407
|
|
1408 ;; Here's a test of the cool new menu features (from Stig).
|
|
1409
|
|
1410 ;(setq mode-popup-menu
|
|
1411 ; '("Test Popup Menu"
|
|
1412 ; :filter cdr
|
|
1413 ; ["this item won't appear because of the menu filter" ding t]
|
|
1414 ; "--:singleLine"
|
|
1415 ; "singleLine"
|
|
1416 ; "--:doubleLine"
|
|
1417 ; "doubleLine"
|
|
1418 ; "--:singleDashedLine"
|
|
1419 ; "singleDashedLine"
|
|
1420 ; "--:doubleDashedLine"
|
|
1421 ; "doubleDashedLine"
|
|
1422 ; "--:noLine"
|
|
1423 ; "noLine"
|
|
1424 ; "--:shadowEtchedIn"
|
|
1425 ; "shadowEtchedIn"
|
|
1426 ; "--:shadowEtchedOut"
|
|
1427 ; "shadowEtchedOut"
|
|
1428 ; "--:shadowDoubleEtchedIn"
|
|
1429 ; "shadowDoubleEtchedIn"
|
|
1430 ; "--:shadowDoubleEtchedOut"
|
|
1431 ; "shadowDoubleEtchedOut"
|
|
1432 ; "--:shadowEtchedInDash"
|
|
1433 ; "shadowEtchedInDash"
|
|
1434 ; "--:shadowEtchedOutDash"
|
|
1435 ; "shadowEtchedOutDash"
|
|
1436 ; "--:shadowDoubleEtchedInDash"
|
|
1437 ; "shadowDoubleEtchedInDash"
|
|
1438 ; "--:shadowDoubleEtchedOutDash"
|
|
1439 ; "shadowDoubleEtchedOutDash"
|
|
1440 ; ))
|
|
1441
|
76
|
1442 (defun xemacs-splash-buffer ()
|
|
1443 "Redisplay XEmacs splash screen in a buffer."
|
|
1444 (interactive)
|
|
1445 (let ((buffer (get-buffer-create "*Splash*")))
|
|
1446 (set-buffer buffer)
|
|
1447 (erase-buffer buffer)
|
|
1448 (startup-splash-frame)
|
|
1449 (pop-to-buffer buffer)
|
|
1450 (delete-other-windows)))
|
0
|
1451
|
|
1452 (provide 'x-menubar)
|
|
1453
|
|
1454 ;;; x-menubar.el ends here.
|