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