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