comparison lisp/x-menubar.el @ 219:262b8bb4a523 r20-4b8

Import from CVS: tag r20-4b8
author cvs
date Mon, 13 Aug 2007 10:09:35 +0200
parents d44af0c54775
children 0e522484dd2a
comparison
equal deleted inserted replaced
218:c9f226976f56 219:262b8bb4a523
33 33
34 ;;; Code: 34 ;;; Code:
35 35
36 ;;; Warning-free compile 36 ;;; Warning-free compile
37 (eval-when-compile 37 (eval-when-compile
38 (defvar language-environment-list) 38 (defvar language-environment-list))
39 (require 'pending-del))
40 39
41 (defconst default-menubar 40 (defconst default-menubar
42 (purecopy-menubar 41 (purecopy-menubar
43 ;; note backquote. 42 ;; note backquote.
44 `( 43 `(
52 "------" 51 "------"
53 ["Save" save-buffer t nil] 52 ["Save" save-buffer t nil]
54 ["Save As..." write-file t] 53 ["Save As..." write-file t]
55 ["Save Some Buffers" save-some-buffers t] 54 ["Save Some Buffers" save-some-buffers t]
56 "-----" 55 "-----"
57 ["Print Buffer" lpr-buffer t nil] 56 ;; Ugly, ugly. The following two items _must_ be written in deprecated
58 ["Pretty-Print Buffer" ps-print-buffer-with-faces t nil] 57 ;; form due to braindamage in the `file-menu-filter' function.
58 ["Print Buffer" lpr-buffer (fboundp 'lpr-buffer) nil]
59 ["Pretty-Print Buffer" ps-print-buffer-with-faces (fboundp 'ps-print-buffer-with-faces) nil]
59 "-----" 60 "-----"
60 ["New Frame" make-frame t] 61 ["New Frame" make-frame t]
61 ["Frame on Other Display..." 62 ["Frame on Other Display..."
62 make-frame-on-display t] 63 make-frame-on-display t]
63 ["Delete Frame" delete-frame t] 64 ["Delete Frame" delete-frame t]
119 ["Set coding system of process" 120 ["Set coding system of process"
120 set-current-process-coding-system nil] ; not implemented yet 121 set-current-process-coding-system nil] ; not implemented yet
121 "--" 122 "--"
122 ["Show character table" view-charset-by-menu t] 123 ["Show character table" view-charset-by-menu t]
123 ["Show diagnosis for MULE" mule-diag nil] ; not implemented yet 124 ["Show diagnosis for MULE" mule-diag nil] ; not implemented yet
124 ["Show many languages" view-hello-file t] 125 ["Show many languages" view-hello-file t])))
125 )))
126 126
127 ("Apps" 127 ("Apps"
128 ["Read Mail (VM)..." vm t] 128 ["Read Mail (VM)..." vm
129 ["Read Mail (MH)..." (mh-rmail t) t] 129 :active (fboundp 'vm-easy-menu-define)]
130 ["Send mail..." mail t] 130 ["Read Mail (MH)..." (mh-rmail t)
131 ["Usenet News" gnus (fboundp 'gnus)] 131 :active (fboundp 'mh-rmail)]
132 ["Browse the Web" w3 t] 132 ["Send mail..." mail
133 ["Gopher" gopher t] 133 :active (fboundp 'mail)]
134 ["Hyperbole..." hyperbole t] 134 ["Usenet News" gnus
135 :active (fboundp 'gnus)]
136 ["Browse the Web" w3
137 :active (fboundp 'w3)]
138 ["Gopher" gopher
139 :active (fboundp 'gopher)]
140 ["Hyperbole..." hyperbole
141 :active (fboundp 'hmail:compose)]
135 "----" 142 "----"
136 ["Spell-Check Buffer" ispell-buffer t] 143 ["Spell-Check Buffer" ispell-buffer
137 ["Toggle VI emulation" toggle-viper-mode (fboundp 'toggle-viper-mode)] 144 :active (fboundp 'ispell-buffer)]
145 ["Toggle VI emulation" toggle-viper-mode
146 :active (fboundp 'toggle-viper-mode)]
138 "----" 147 "----"
139 ("Calendar" 148 ("Calendar"
140 ["3-Month Calendar" calendar t] 149 ["3-Month Calendar" calendar
141 ["Diary" diary t] 150 :active (fboundp 'calendar)]
142 ["Holidays" holidays t] 151 ["Diary" diary
152 :active (fboundp 'diary)]
153 ["Holidays" holidays
154 :active (fboundp 'holidays)]
143 ;; we're all pagans at heart ... 155 ;; we're all pagans at heart ...
144 ["Phases of the Moon" phases-of-moon t] 156 ["Phases of the Moon" phases-of-moon
145 ["Sunrise/Sunset" sunrise-sunset t] 157 :active (fboundp 'phases-of-moon)]
146 ) 158 ["Sunrise/Sunset" sunrise-sunset
159 :active (fboundp 'sunrise-sunset)])
160
147 ("Games" 161 ("Games"
148 ["Mine Game" xmine (fboundp 'xmine)] 162 ["Mine Game" xmine
149 ["Tetris" tetris (fboundp 'tetris)] 163 :active (fboundp 'xmine)]
150 ["Quote from Zippy" yow (fboundp 'yow)] 164 ["Tetris" tetris
151 ["Psychoanalyst" doctor (fboundp 'doctor)] 165 :active (fboundp 'tetris)]
152 ["Psychoanalyze Zippy!" psychoanalyze-pinhead (fboundp 'psychoanalyze-pinhead)] 166 ["Quote from Zippy" yow
153 ["Random Flames" flame (fboundp 'flame)] 167 :active (fboundp 'yow)]
154 ["Dunnet (Adventure)" dunnet (fboundp 'dunnet)] 168 ["Psychoanalyst" doctor
155 ["Towers of Hanoi" hanoi (fboundp 'hanoi)] 169 :active (fboundp 'doctor)]
156 ["Game of Life" life (fboundp 'life)] 170 ["Psychoanalyze Zippy!" psychoanalyze-pinhead
157 ["Multiplication Puzzle" mpuz (fboundp 'mpuz)] 171 :active (fboundp 'psychoanalyze-pinhead)]
158 ) 172 ["Random Flames" flame
159 ) 173 :active (fboundp 'flame)]
174 ["Dunnet (Adventure)" dunnet
175 :active (fboundp 'dunnet)]
176 ["Towers of Hanoi" hanoi
177 :active (fboundp 'hanoi)]
178 ["Game of Life" life
179 :active (fboundp 'life)]
180 ["Multiplication Puzzle" mpuz
181 :active (fboundp 'mpuz)]))
160 182
161 ("Options" 183 ("Options"
162 ("Customize" 184 ("Customize"
163 ("Emacs" :filter (lambda (&rest junk) 185 ("Emacs" :filter (lambda (&rest junk)
164 (cdr (custom-menu-create 'emacs)))) 186 (cdr (custom-menu-create 'emacs))))
165 ["Group..." customize-group t] 187 ["Group..." customize-group t]
166 ["Variable..." customize-variable t] 188 ["Variable..." customize-variable t]
167 ["Face..." customize-face t] 189 ["Face..." customize-face t]
168 ["Saved..." customize-saved t] 190 ["Saved..." customize-saved t]
169 ["Set..." customize-customized t] 191 ["Set..." customize-customized t]
170 ["Apropos..." customize-apropos t]) 192 ["Apropos..." customize-apropos t]
193 ["Browse..." customize-browse t])
171 ["Read Only" (toggle-read-only) 194 ["Read Only" (toggle-read-only)
172 :style toggle :selected buffer-read-only] 195 :style toggle :selected buffer-read-only]
173 ("Editing Options" 196 ("Editing Options"
174 ["Overstrike" (progn 197 ["Overstrike" (progn
175 (overwrite-mode current-prefix-arg) 198 (overwrite-mode current-prefix-arg)
183 ["Case Matching Replace" (setq case-replace (not case-replace)) 206 ["Case Matching Replace" (setq case-replace (not case-replace))
184 :style toggle :selected case-replace] 207 :style toggle :selected case-replace]
185 ["Auto Delete Selection" (pending-delete-mode 208 ["Auto Delete Selection" (pending-delete-mode
186 (if pending-delete-mode 0 1)) 209 (if pending-delete-mode 0 1))
187 :style toggle 210 :style toggle
188 :selected (and (boundp 'pending-delete-mode) pending-delete-mode)] 211 :selected (and (boundp 'pending-delete-mode) pending-delete-mode)
212 :active (fboundp 'pending-delete-mode)]
189 ["Active Regions" (setq zmacs-regions (not zmacs-regions)) 213 ["Active Regions" (setq zmacs-regions (not zmacs-regions))
190 :style toggle :selected zmacs-regions] 214 :style toggle :selected zmacs-regions]
191 ["Mouse Paste At Text Cursor" (setq mouse-yank-at-point 215 ["Mouse Paste At Text Cursor" (setq mouse-yank-at-point
192 (not mouse-yank-at-point)) 216 (not mouse-yank-at-point))
193 :style toggle :selected mouse-yank-at-point] 217 :style toggle :selected mouse-yank-at-point]
211 ("Printing Options" 235 ("Printing Options"
212 ["Command-Line Switches for `lpr'/`lp'..." 236 ["Command-Line Switches for `lpr'/`lp'..."
213 (setq lpr-switches 237 (setq lpr-switches
214 (read-expression "Switches for `lpr'/`lp': " 238 (read-expression "Switches for `lpr'/`lp': "
215 (format "%S" lpr-switches))) 239 (format "%S" lpr-switches)))
216 t] 240 (fboundp 'lpr-buffer)]
217 ("Pretty-Print Paper Size" 241 ("Pretty-Print Paper Size"
218 ["Letter" 242 ["Letter"
219 (setq ps-paper-type 'letter) 243 (setq ps-paper-type 'letter)
220 :style radio 244 :style radio
221 :selected (eq ps-paper-type 'letter)] 245 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'letter))
246 :active (fboundp 'ps-print-buffer)]
222 ["Letter-small" 247 ["Letter-small"
223 (setq ps-paper-type 'letter-small) 248 (setq ps-paper-type 'letter-small)
224 :style radio 249 :style radio
225 :selected (eq ps-paper-type 'letter-small)] 250 :selected (and (boundp 'ps-paper-type)
251 (eq ps-paper-type 'letter-small))
252 :active (fboundp 'ps-print-buffer)]
226 ["Legal" 253 ["Legal"
227 (setq ps-paper-type 'legal) 254 (setq ps-paper-type 'legal)
228 :style radio 255 :style radio
229 :selected (eq ps-paper-type 'legal)] 256 :selected (and (boundp 'ps-paper-type)
257 (eq ps-paper-type 'legal))
258 :active (fboundp 'ps-print-buffer)]
230 ["Statement" 259 ["Statement"
231 (setq ps-paper-type 'statement) 260 (setq ps-paper-type 'statement)
232 :style radio 261 :style radio
233 :selected (eq ps-paper-type 'statement)] 262 :selected (and (boundp 'ps-paper-type)
263 (eq ps-paper-type 'statement))
264 :active (fboundp 'ps-print-buffer)]
234 ["Executive" 265 ["Executive"
235 (setq ps-paper-type 'executive) 266 (setq ps-paper-type 'executive)
236 :style radio 267 :style radio
237 :selected (eq ps-paper-type 'executive)] 268 :selected (and (boundp 'ps-paper-type)
269 (eq ps-paper-type 'executive))
270 :active (fboundp 'ps-print-buffer)]
238 ["Tabloid" 271 ["Tabloid"
239 (setq ps-paper-type 'tabloid) 272 (setq ps-paper-type 'tabloid)
240 :style radio 273 :style radio
241 :selected (eq ps-paper-type 'tabloid)] 274 :selected (and (boundp 'ps-paper-type)
275 (eq ps-paper-type 'tabloid))
276 :active (fboundp 'ps-print-buffer)]
242 ["Ledger" 277 ["Ledger"
243 (setq ps-paper-type 'ledger) 278 (setq ps-paper-type 'ledger)
244 :style radio 279 :style radio
245 :selected (eq ps-paper-type 'ledger)] 280 :selected (and (boundp 'ps-paper-type)
281 (eq ps-paper-type 'ledger))
282 :active (fboundp 'ps-print-buffer)]
246 ["A3" 283 ["A3"
247 (setq ps-paper-type 'a3) 284 (setq ps-paper-type 'a3)
248 :style radio 285 :style radio
249 :selected (eq ps-paper-type 'a3)] 286 :selected (and (boundp 'ps-paper-type)
287 (eq ps-paper-type 'a3))
288 :active (fboundp 'ps-print-buffer)]
250 ["A4" 289 ["A4"
251 (setq ps-paper-type 'a4) 290 (setq ps-paper-type 'a4)
252 :style radio 291 :style radio
253 :selected (eq ps-paper-type 'a4)] 292 :selected (and (boundp 'ps-paper-type)
293 (eq ps-paper-type 'a4))
294 :active (fboundp 'ps-print-buffer)]
254 ["A4small" 295 ["A4small"
255 (setq ps-paper-type 'a4small) 296 (setq ps-paper-type 'a4small)
256 :style radio 297 :style radio
257 :selected (eq ps-paper-type 'a4small)] 298 :selected (and (boundp 'ps-paper-type)
299 (eq ps-paper-type 'a4small))
300 :active (fboundp 'ps-print-buffer)]
258 ["B4" 301 ["B4"
259 (setq ps-paper-type 'b4) 302 (setq ps-paper-type 'b4)
260 :style radio 303 :style radio
261 :selected (eq ps-paper-type 'b4)] 304 :selected (and (boundp 'ps-paper-type)
305 (eq ps-paper-type 'b4))
306 :active (fboundp 'ps-print-buffer)]
262 ["B5" 307 ["B5"
263 (setq ps-paper-type 'b5) 308 (setq ps-paper-type 'b5)
264 :style radio 309 :style radio
265 :selected (eq ps-paper-type 'b5)] 310 :selected (and (boundp 'ps-paper-type)
311 (eq ps-paper-type 'b5))
312 :active (fboundp 'ps-print-buffer)]
266 ) 313 )
267 ["Color Printing" 314 ["Color Printing"
268 (when (boundp 'ps-print-color-p) 315 (when (boundp 'ps-print-color-p)
269 (if ps-print-color-p 316 (if ps-print-color-p
270 (progn 317 (progn
274 (set-face-background 'default original-face-background))) 321 (set-face-background 'default original-face-background)))
275 (setq original-face-background (face-background-instance 'default)) 322 (setq original-face-background (face-background-instance 'default))
276 (set-face-background 'default "white") 323 (set-face-background 'default "white")
277 (setq ps-print-color-p t))) 324 (setq ps-print-color-p t)))
278 :style toggle :selected (and (boundp 'ps-print-color-p) 325 :style toggle :selected (and (boundp 'ps-print-color-p)
279 ps-print-color-p)] 326 ps-print-color-p)
280 ) 327 :active (fboundp 'ps-print-buffer)])
281 ("\"Other Window\" Location" 328 ("\"Other Window\" Location"
282 ["Always in Same Frame" 329 ["Always in Same Frame"
283 (setq get-frame-for-buffer-default-instance-limit nil) 330 (setq get-frame-for-buffer-default-instance-limit nil)
284 :style radio 331 :style radio
285 :selected (null get-frame-for-buffer-default-instance-limit)] 332 :selected (null get-frame-for-buffer-default-instance-limit)]
324 ) 371 )
325 372
326 "-----" 373 "-----"
327 ("Syntax Highlighting" 374 ("Syntax Highlighting"
328 ["In This Buffer" (font-lock-mode) 375 ["In This Buffer" (font-lock-mode)
329 :style toggle :selected font-lock-mode] 376 :style toggle :selected (and (boundp 'font-lock-mode) font-lock-mode)
377 :active (fboundp 'font-lock-mode)]
330 ["Automatic" (if (not (featurep 'font-lock)) 378 ["Automatic" (if (not (featurep 'font-lock))
331 (progn 379 (progn
332 (setq font-lock-auto-fontify t) 380 (setq font-lock-auto-fontify t)
333 (require 'font-lock)) 381 (require 'font-lock))
334 (setq font-lock-auto-fontify 382 (setq font-lock-auto-fontify
335 (not font-lock-auto-fontify))) 383 (not font-lock-auto-fontify)))
336 :style toggle 384 :style toggle
337 :selected (and (featurep 'font-lock) font-lock-auto-fontify)] 385 :selected (and (featurep 'font-lock) font-lock-auto-fontify)
386 :active (fboundp 'font-lock-mode)]
338 "-----" 387 "-----"
339 ["Fonts" (progn (require 'font-lock) 388 ["Fonts" (progn (require 'font-lock)
340 (font-lock-use-default-fonts) 389 (font-lock-use-default-fonts)
341 (setq font-lock-use-fonts t 390 (setq font-lock-use-fonts t
342 font-lock-use-colors nil) 391 font-lock-use-colors nil)
343 (font-lock-mode 1)) 392 (font-lock-mode 1))
344 :style radio 393 :style radio
345 :selected (and font-lock-mode 394 :selected (and (boundp 'font-lock-mode)
346 font-lock-use-fonts)] 395 font-lock-mode
396 font-lock-use-fonts)
397 :active (fboundp 'font-lock-mode)]
347 ["Colors" (progn (require 'font-lock) 398 ["Colors" (progn (require 'font-lock)
348 (font-lock-use-default-colors) 399 (font-lock-use-default-colors)
349 (setq font-lock-use-colors t 400 (setq font-lock-use-colors t
350 font-lock-use-fonts nil) 401 font-lock-use-fonts nil)
351 (font-lock-mode 1)) 402 (font-lock-mode 1))
352 :style radio 403 :style radio
353 :selected (and font-lock-mode 404 :selected (and (boundp 'font-lock-mode)
354 font-lock-use-colors)] 405 font-lock-mode
406 font-lock-use-colors)
407 :active (fboundp 'font-lock-mode)]
355 "-----" 408 "-----"
356 ["Least" (if (or (and (not (integerp font-lock-maximum-decoration)) 409 ["Least" (if (or (and (not (integerp font-lock-maximum-decoration))
357 (not (eq t font-lock-maximum-decoration))) 410 (not (eq t font-lock-maximum-decoration)))
358 (and (integerp font-lock-maximum-decoration) 411 (and (integerp font-lock-maximum-decoration)
359 (<= font-lock-maximum-decoration 0))) 412 (<= font-lock-maximum-decoration 0)))
360 nil 413 nil
361 (setq font-lock-maximum-decoration nil) 414 (setq font-lock-maximum-decoration nil)
362 (font-lock-recompute-variables)) 415 (font-lock-recompute-variables))
363 :style radio 416 :style radio
364 :active font-lock-mode 417 :active (and (boundp 'font-lock-mode) font-lock-mode)
365 :selected (and font-lock-mode 418 :selected (and font-lock-mode
366 (or (and (not (integerp font-lock-maximum-decoration)) 419 (or (and (not (integerp font-lock-maximum-decoration))
367 (not (eq t font-lock-maximum-decoration))) 420 (not (eq t font-lock-maximum-decoration)))
368 (and (integerp font-lock-maximum-decoration) 421 (and (integerp font-lock-maximum-decoration)
369 (<= font-lock-maximum-decoration 0))))] 422 (<= font-lock-maximum-decoration 0))))]
371 (= 1 font-lock-maximum-decoration)) 424 (= 1 font-lock-maximum-decoration))
372 nil 425 nil
373 (setq font-lock-maximum-decoration 1) 426 (setq font-lock-maximum-decoration 1)
374 (font-lock-recompute-variables)) 427 (font-lock-recompute-variables))
375 :style radio 428 :style radio
376 :active font-lock-mode 429 :active (and (boundp 'font-lock-mode) font-lock-mode)
377 :selected (and font-lock-mode 430 :selected (and font-lock-mode
378 (integerp font-lock-maximum-decoration) 431 (integerp font-lock-maximum-decoration)
379 (= 1 font-lock-maximum-decoration))] 432 (= 1 font-lock-maximum-decoration))]
380 ["Even More" (if (and (integerp font-lock-maximum-decoration) 433 ["Even More" (if (and (integerp font-lock-maximum-decoration)
381 (= 2 font-lock-maximum-decoration)) 434 (= 2 font-lock-maximum-decoration))
382 nil 435 nil
383 (setq font-lock-maximum-decoration 2) 436 (setq font-lock-maximum-decoration 2)
384 (font-lock-recompute-variables)) 437 (font-lock-recompute-variables))
385 :style radio 438 :style radio
386 :active font-lock-mode 439 :active (and (boundp 'font-lock-mode) font-lock-mode)
387 :selected (and font-lock-mode 440 :selected (and font-lock-mode
388 (integerp font-lock-maximum-decoration) 441 (integerp font-lock-maximum-decoration)
389 (= 2 font-lock-maximum-decoration))] 442 (= 2 font-lock-maximum-decoration))]
390 ["Most" (if (or (eq font-lock-maximum-decoration t) 443 ["Most" (if (or (eq font-lock-maximum-decoration t)
391 (and (integerp font-lock-maximum-decoration) 444 (and (integerp font-lock-maximum-decoration)
392 (>= font-lock-maximum-decoration 3))) 445 (>= font-lock-maximum-decoration 3)))
393 nil 446 nil
394 (setq font-lock-maximum-decoration t) 447 (setq font-lock-maximum-decoration t)
395 (font-lock-recompute-variables)) 448 (font-lock-recompute-variables))
396 :style radio 449 :style radio
397 :active font-lock-mode 450 :active (and (boundp 'font-lock-mode) font-lock-mode)
398 :selected (and font-lock-mode 451 :selected (and font-lock-mode
399 (or (eq font-lock-maximum-decoration t) 452 (or (eq font-lock-maximum-decoration t)
400 (and (integerp font-lock-maximum-decoration) 453 (and (integerp font-lock-maximum-decoration)
401 (>= font-lock-maximum-decoration 3))))] 454 (>= font-lock-maximum-decoration 3))))]
402 "-----" 455 "-----"
414 (progn 467 (progn
415 (lazy-shot-mode 1) 468 (lazy-shot-mode 1)
416 (redraw-modeline) 469 (redraw-modeline)
417 (add-hook 'font-lock-mode-hook 470 (add-hook 'font-lock-mode-hook
418 'turn-on-lazy-shot))))) 471 'turn-on-lazy-shot)))))
419 :active font-lock-mode 472 :active (and (boundp 'font-lock-mode)
473 (boundp 'lazy-shot-mode)
474 font-lock-mode)
420 :style toggle 475 :style toggle
421 :selected (and (boundp 'lazy-shot-mode) lazy-shot-mode)] 476 :selected (and (boundp 'lazy-shot-mode) lazy-shot-mode)]
422 ["Caching" (progn (require 'fast-lock) 477 ["Caching" (progn (require 'fast-lock)
423 (if fast-lock-mode 478 (if fast-lock-mode
424 (progn 479 (progn
429 (redraw-modeline)) 484 (redraw-modeline))
430 (if font-lock-mode 485 (if font-lock-mode
431 (progn 486 (progn
432 (fast-lock-mode 1) 487 (fast-lock-mode 1)
433 (redraw-modeline))))) 488 (redraw-modeline)))))
434 :active font-lock-mode 489 :active (and (boundp 'font-lock-mode) font-lock-mode)
435 :style toggle 490 :style toggle
436 :selected (and (boundp 'fast-lock-mode) fast-lock-mode)] 491 :selected (and (boundp 'fast-lock-mode) fast-lock-mode)]
437 ) 492 )
438 ("Paren Highlighting" 493 ("Paren Highlighting"
439 ["None" (paren-set-mode -1) 494 ["None" (paren-set-mode -1)
440 :style radio :selected (not paren-mode)] 495 :style radio :selected (and (boundp 'paren-mode) (not paren-mode))
496 :active (fboundp 'paren-set-mode)]
441 ["Blinking Paren" (paren-set-mode 'blink-paren) 497 ["Blinking Paren" (paren-set-mode 'blink-paren)
442 :style radio :selected (eq paren-mode 'blink-paren)] 498 :style radio :selected (and (boundp 'paren-mode)
499 (eq paren-mode 'blink-paren))
500 :active (fboundp 'paren-set-mode)]
443 ["Steady Paren" (paren-set-mode 'paren) 501 ["Steady Paren" (paren-set-mode 'paren)
444 :style radio :selected (eq paren-mode 'paren)] 502 :style radio :selected (and (boundp 'paren-mode)
503 (eq paren-mode 'paren))
504 :active (fboundp 'paren-set-mode)]
445 ["Expression" (paren-set-mode 'sexp) 505 ["Expression" (paren-set-mode 'sexp)
446 :style radio :selected (eq paren-mode 'sexp)] 506 :style radio :selected (and (boundp 'paren-mode)
507 (eq paren-mode 'sexp))
508 :active (fboundp 'paren-set-mode)]
447 ;;; ["Nested Shading" (paren-set-mode 'nested) 509 ;;; ["Nested Shading" (paren-set-mode 'nested)
448 ;;; :style radio :selected (eq paren-mode 'nested)] 510 ;;; :style radio :selected (eq paren-mode 'nested)]
449 ) 511 )
450 "-----" 512 "-----"
451 ("Frame Appearance" 513 ("Frame Appearance"
563 (if mouse-avoidance-mode 625 (if mouse-avoidance-mode
564 (mouse-avoidance-mode 'none) 626 (mouse-avoidance-mode 'none)
565 (mouse-avoidance-mode 'banish)) 627 (mouse-avoidance-mode 'banish))
566 (beep) 628 (beep)
567 (message "This option requires a window system.")) 629 (message "This option requires a window system."))
568 :style toggle :selected (and mouse-avoidance-mode window-system)] 630 :style toggle :selected (and (boundp 'mouse-avoidance-mode)
631 mouse-avoidance-mode
632 window-system)
633 :active (fboundp 'mouse-avoidance-mode)]
569 ["strokes-mode" 634 ["strokes-mode"
570 (if (equal (device-type) 'x) 635 (if (equal (device-type) 'x)
571 (strokes-mode) 636 (strokes-mode)
572 (beep) 637 (beep)
573 (message "This option requires a window system.")) 638 (message "This option requires a window system."))
574 :style toggle :selected (and (boundp 'strokes-mode) 639 :style toggle :selected (and (boundp 'strokes-mode)
575 strokes-mode 640 strokes-mode
576 window-system)]) 641 window-system)
642 :active (fboundp 'strokes-mode)])
577 ("Open URLs With" 643 ("Open URLs With"
578 ["Emacs-W3" (setq browse-url-browser-function 'browse-url-w3) 644 ["Emacs-W3" (setq browse-url-browser-function 'browse-url-w3)
579 :style radio 645 :style radio
580 :selected (eq browse-url-browser-function 'browse-url-w3)] 646 :selected (and (boundp 'browse-url-browser-function)
647 (eq browse-url-browser-function 'browse-url-w3))
648 :active (and (fboundp 'browse-url-w3)
649 (fboundp 'w3-fetch))]
581 ["Netscape" (setq browse-url-browser-function 'browse-url-netscape) 650 ["Netscape" (setq browse-url-browser-function 'browse-url-netscape)
582 :style radio 651 :style radio
583 :selected (eq browse-url-browser-function 'browse-url-netscape)] 652 :selected (and (boundp 'browse-url-browser-function)
653 (eq browse-url-browser-function 'browse-url-netscape))
654 :active (fboundp 'browse-url-netscape)]
584 ["Mosaic" (setq browse-url-browser-function 'browse-url-mosaic) 655 ["Mosaic" (setq browse-url-browser-function 'browse-url-mosaic)
585 :style radio 656 :style radio
586 :selected (eq browse-url-browser-function 'browse-url-mosaic)] 657 :selected (and (boundp 'browse-url-browser-function)
658 (eq browse-url-browser-function 'browse-url-mosaic))
659 :active (fboundp 'browse-url-mosaic)]
587 ["Mosaic (CCI)" (setq browse-url-browser-function 'browse-url-cci) 660 ["Mosaic (CCI)" (setq browse-url-browser-function 'browse-url-cci)
588 :style radio 661 :style radio
589 :selected (eq browse-url-browser-function 'browse-url-iximosaic)] 662 :selected (and (boundp 'browse-url-browser-function)
663 (eq browse-url-browser-function 'browse-url-iximosaic))
664 :active (fboundp 'browse-url-iximosaic)]
590 ["IXI Mosaic" (setq browse-url-browser-function 'browse-url-iximosaic) 665 ["IXI Mosaic" (setq browse-url-browser-function 'browse-url-iximosaic)
591 :style radio 666 :style radio
592 :selected (eq browse-url-browser-function 'browse-url-iximosaic)] 667 :selected (and (boundp 'browse-url-browser-function)
668 (eq browse-url-browser-function 'browse-url-iximosaic))
669 :active (fboundp 'browse-url-iximosaic)]
593 ["Lynx (xterm)" (setq browse-url-browser-function 'browse-url-lynx-xterm) 670 ["Lynx (xterm)" (setq browse-url-browser-function 'browse-url-lynx-xterm)
594 :style radio 671 :style radio
595 :selected (eq browse-url-browser-function 'browse-url-lynx-xterm)] 672 :selected (and (boundp 'browse-url-browser-function)
673 (eq browse-url-browser-function 'browse-url-lynx-xterm))
674 :active (fboundp 'browse-url-lynx-xterm)]
596 ["Lynx (xemacs)" (setq browse-url-browser-function 'browse-url-lynx-emacs) 675 ["Lynx (xemacs)" (setq browse-url-browser-function 'browse-url-lynx-emacs)
597 :style radio 676 :style radio
598 :selected (eq browse-url-browser-function 'browse-url-lynx-emacs)] 677 :selected (and (boundp 'browse-url-browser-function)
678 (eq browse-url-browser-function 'browse-url-lynx-emacs))
679 :active (fboundp 'browse-url-lynx-emacs)]
599 ["Grail" (setq browse-url-browser-function 'browse-url-grail) 680 ["Grail" (setq browse-url-browser-function 'browse-url-grail)
600 :style radio 681 :style radio
601 :selected (eq browse-url-browser-function 'browse-url-grail)] 682 :selected (and (boundp 'browse-url-browser-function)
683 (eq browse-url-browser-function 'browse-url-grail))
684 :active (fboundp 'browse-url-grail)]
602 ) 685 )
603 "-----" 686 "-----"
604 ["Browse Faces..." edit-faces t] 687 ["Browse Faces..." edit-faces t]
605 ("Font" :filter font-menu-family-constructor) 688 ("Font" :filter font-menu-family-constructor)
606 ("Size" :filter font-menu-size-constructor) 689 ("Size" :filter font-menu-size-constructor)
614 ["List All Buffers" list-buffers t] 697 ["List All Buffers" list-buffers t]
615 "--" 698 "--"
616 ) 699 )
617 700
618 ("Tools" 701 ("Tools"
619 ["Grep..." grep t] 702 ["Grep..." grep
620 ["Compile..." compile t] 703 :active (fboundp 'grep)]
621 ["Shell" shell t] 704 ["Compile..." compile
622 ["Shell Command..." shell-command t] 705 :active (fboundp 'compile)]
623 ["Shell Command on Region..." shell-command-on-region (region-exists-p)] 706 ["Shell" shell
624 ["Debug (GDB)..." gdb t] 707 :active (fboundp 'shell)]
625 ["Debug (DBX)..." dbx t] 708 ["Shell Command..." shell-command
709 :active (fboundp 'shell-command)]
710 ["Shell Command on Region..." shell-command-on-region
711 :active (and (fboundp 'shell-command-on-region)
712 (region-exists-p))]
713 ["Debug (GDB)..." gdb
714 :active (fboundp 'gdb)]
715 ["Debug (DBX)..." dbx
716 :active (fboundp 'dbx)]
626 "-----" 717 "-----"
627 ["OO-Browser..." oobr t] 718 ["OO-Browser..." oobr
719 :active (fboundp 'oobr)]
628 ("Tags" 720 ("Tags"
629 ["Find Tag..." find-tag t] 721 ["Find Tag..." find-tag t]
630 ["Find Other Window..." find-tag-other-window t] 722 ["Find Other Window..." find-tag-other-window t]
631 ["Next Tag..." (find-tag nil) t] 723 ["Next Tag..." (find-tag nil) t]
632 ["Next Other Window..." (find-tag-other-window nil) t] 724 ["Next Other Window..." (find-tag-other-window nil) t]
652 ["Packages" finder-by-keyword t] 744 ["Packages" finder-by-keyword t]
653 ["Splash" xemacs-splash-buffer t]) 745 ["Splash" xemacs-splash-buffer t])
654 "-----" 746 "-----"
655 ("XEmacs FAQ" 747 ("XEmacs FAQ"
656 ["FAQ (local)" xemacs-local-faq t] 748 ["FAQ (local)" xemacs-local-faq t]
657 ["FAQ via WWW" xemacs-www-faq t] 749 ["FAQ via WWW" xemacs-www-faq (boundp 'browse-url-browser-function)]
658 ["Home Page" xemacs-www-page t]) 750 ["Home Page" xemacs-www-page (boundp 'browse-url-browser-function)])
659 ("Samples" 751 ("Samples"
660 ["Sample" (find-file 752 ["Sample" (find-file
661 (expand-file-name "sample.emacs" 753 (expand-file-name "sample.emacs"
662 data-directory)) 754 data-directory))
663 t ".emacs"] 755 t ".emacs"]
695 ["Recent Messages" view-lossage t] 787 ["Recent Messages" view-lossage t]
696 ("Misc" 788 ("Misc"
697 ["No Warranty" describe-no-warranty t] 789 ["No Warranty" describe-no-warranty t]
698 ["XEmacs License" describe-copying t] 790 ["XEmacs License" describe-copying t]
699 ["The Latest Version" describe-distribution t]) 791 ["The Latest Version" describe-distribution t])
700 ["Submit Bug Report" send-pr t] 792 ["Submit Bug Report" send-pr t]))))
701 )
702 )))
703 793
704 794
705 (defun maybe-add-init-button () 795 (defun maybe-add-init-button ()
706 "Don't call this. 796 "Don't call this.
707 Adds `Load .emacs' button to menubar when starting up with -q." 797 Adds `Load .emacs' button to menubar when starting up with -q."
848 :filter (lambda (&rest junk) 938 :filter (lambda (&rest junk)
849 (mapcar #'(lambda (bmk) 939 (mapcar #'(lambda (bmk)
850 `[,bmk (bookmark-jump ',bmk) t]) 940 `[,bmk (bookmark-jump ',bmk) t])
851 (bookmark-all-names)))) 941 (bookmark-all-names))))
852 ["Jump to Bookmark" nil nil]) 942 ["Jump to Bookmark" nil nil])
853 ["Set bookmark" bookmark-set t] 943 ["Set bookmark" bookmark-set
944 :active (fboundp 'bookmark-set)]
854 "---" 945 "---"
855 ["Insert contents" bookmark-menu-insert t] 946 ["Insert contents" bookmark-menu-insert
856 ["Insert location" bookmark-menu-locate t] 947 :active (fboundp 'bookmark-menu-insert)]
948 ["Insert location" bookmark-menu-locate
949 :active (fboundp 'bookmark-menu-locate)]
857 "---" 950 "---"
858 ["Rename bookmark" bookmark-menu-rename t] 951 ["Rename bookmark" bookmark-menu-rename
952 :active (fboundp 'bookmark-menu-rename)]
859 ,(if definedp 953 ,(if definedp
860 '("Delete Bookmark" 954 '("Delete Bookmark"
861 :filter (lambda (&rest junk) 955 :filter (lambda (&rest junk)
862 (mapcar #'(lambda (bmk) 956 (mapcar #'(lambda (bmk)
863 `[,bmk (bookmark-delete ',bmk) t]) 957 `[,bmk (bookmark-delete ',bmk) t])
864 (bookmark-all-names)))) 958 (bookmark-all-names))))
865 ["Delete Bookmark" nil nil]) 959 ["Delete Bookmark" nil nil])
866 ["Edit Bookmark List" bookmark-bmenu-list ,definedp] 960 ["Edit Bookmark List" bookmark-bmenu-list ,definedp]
867 "---" 961 "---"
868 ["Save bookmarks" bookmark-save ,definedp] 962 ["Save bookmarks" bookmark-save ,definedp]
869 ["Save bookmarks as..." bookmark-write ,definedp] 963 ["Save bookmarks as..." bookmark-write ,definedp]
870 ["Load a bookmark file" bookmark-load t]))) 964 ["Load a bookmark file" bookmark-load
965 :active (fboundp 'bookmark-load)])))
871 966
872 ;;; The Buffers menu 967 ;;; The Buffers menu
873 968
874 (defgroup buffers-menu nil 969 (defgroup buffers-menu nil
875 "Customization of `Buffers' menu." 970 "Customization of `Buffers' menu."