annotate lisp/x-menubar.el @ 265:8efd647ea9ca r20-5b31

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