comparison lisp/menubar-items.el @ 4372:ebb35ddea76a

Byte-compile menu lambdas; make the menu of available tutorials more readable. 2007-12-31 Aidan Kehoe <kehoea@parhasard.net> * menubar-items.el (default-menubar): Byte compile the specified lambdas. Correct some compile time warnings uncovered by this. * menubar-items.el (tutorials-menu-filter): If a language environment doesn't have an associated POSIX locale specified--which indicates we don't want it used except by those who know what they're doing--don't show its tutorial in the menu. * behavior.el (behavior-menu-filter): Byte compile the lambdas in the generated menu.
author Aidan Kehoe <kehoea@parhasard.net>
date Mon, 31 Dec 2007 21:34:45 +0100
parents 0f411920c8db
children 12ff8dc2b57e
comparison
equal deleted inserted replaced
4353:4143b78d0df0 4372:ebb35ddea76a
97 (not (eq name (coding-system-name 97 (not (eq name (coding-system-name
98 (coding-system-base name)))))) 98 (coding-system-base name))))))
99 (coding-system-list))))) 99 (coding-system-list)))))
100 100
101 (defconst default-menubar 101 (defconst default-menubar
102 ; (purecopy-menubar ;purespace is dead 102 ;; This is backquoted; a lambda with a preceding , will be byte-compiled.
103 ;; note backquote. 103 `(("%_File"
104 `(
105 ("%_File"
106 ["%_Open..." find-file] 104 ["%_Open..." find-file]
107 ["Open in Other %_Window..." find-file-other-window] 105 ["Open in Other %_Window..." find-file-other-window]
108 ["Open in New %_Frame..." find-file-other-frame] 106 ["Open in New %_Frame..." find-file-other-frame]
109 ("Open with Specified %_Encoding" 107 ("Open with Specified %_Encoding"
110 :filter 108 :filter
111 (lambda (menu) 109 ,#'(lambda (menu)
112 (coding-system-menu-filter 110 (coding-system-menu-filter
113 (lambda (entry) 111 (lambda (entry)
114 (let ((coding-system-for-read entry)) 112 (let ((coding-system-for-read entry))
115 (call-interactively 'find-file))) 113 (call-interactively 'find-file)))
116 (lambda (entry) t) 114 (lambda (entry) t)
117 t)) 115 t)))
118 )
119 ["%_Hex Edit File..." hexl-find-file 116 ["%_Hex Edit File..." hexl-find-file
120 :active (fboundp 'hexl-find-file)] 117 :active (fboundp 'hexl-find-file)]
121 ["%_Insert File..." insert-file] 118 ["%_Insert File..." insert-file]
122 ["%_View File..." view-file] 119 ["%_View File..." view-file]
123 "------" 120 "------"
133 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] 130 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
134 ["Save %_As..." write-file] 131 ["Save %_As..." write-file]
135 ["Save So%_me Buffers" save-some-buffers] 132 ["Save So%_me Buffers" save-some-buffers]
136 "-----" 133 "-----"
137 ,@(if (valid-specifier-tag-p 'msprinter) 134 ,@(if (valid-specifier-tag-p 'msprinter)
138 '(["Page Set%_up..." generic-page-setup])) 135 '(["Page Set%_up..." generic-page-setup]))
139 ["%_Print" generic-print-buffer 136 ["%_Print" generic-print-buffer
140 :active (or (valid-specifier-tag-p 'msprinter) 137 :active (or (valid-specifier-tag-p 'msprinter)
141 (and (not (eq system-type 'windows-nt)) 138 (and (not (eq system-type 'windows-nt))
142 (fboundp 'lpr-region))) 139 (fboundp 'lpr-region)))
143 :suffix (if (region-active-p) "Selection..." 140 :suffix (if (region-active-p) "Selection..."
150 "-----" 147 "-----"
151 ["%_Revert Buffer" revert-buffer 148 ["%_Revert Buffer" revert-buffer
152 :active (or buffer-file-name revert-buffer-function) 149 :active (or buffer-file-name revert-buffer-function)
153 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] 150 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
154 ("Rever%_t/Recover" 151 ("Rever%_t/Recover"
155 ("Revert Buffer with Specified %_Encoding" 152 ("Revert Buffer with Specified %_Encoding"
156 :filter 153 :filter
157 (lambda (menu) 154 ,#'(lambda (menu)
158 (coding-system-menu-filter 155 (coding-system-menu-filter
159 (lambda (entry) 156 (lambda (entry)
160 (let ((coding-system-for-read entry)) 157 (let ((coding-system-for-read entry))
161 (revert-buffer))) 158 (revert-buffer)))
162 (lambda (entry) (or buffer-file-name revert-buffer-function)) 159 (lambda (entry) (or buffer-file-name revert-buffer-function))
163 t)) 160 t)))
161 ["Re%_cover Buffer from Autosave" (recover-file buffer-file-name)
162 :active buffer-file-name
163 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
164 ["Recover %_Session..." recover-session]
164 ) 165 )
165 ["Re%_cover Buffer from Autosave" (recover-file buffer-file-name)
166 :active buffer-file-name
167 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
168 ["Recover %_Session..." recover-session]
169 )
170 "-----" 166 "-----"
171 ["E%_xit XEmacs" save-buffers-kill-emacs] 167 ["E%_xit XEmacs" save-buffers-kill-emacs]
172 ) 168 )
173 169
174 ("%_Edit" 170 ("%_Edit"
175 ["%_Undo" undo 171 ["%_Undo" undo
176 :active (and (not (eq buffer-undo-list t)) 172 :active (and (not (eq buffer-undo-list t))
177 (or buffer-undo-list pending-undo-list)) 173 (or buffer-undo-list pending-undo-list))
178 :suffix (if (eq last-command 'undo) "More" "")] 174 :suffix (if (eq last-command 'undo) "More" "")]
179 ["%_Redo" redo 175 ["%_Redo" redo
180 :included (fboundp 'redo) 176 :included (fboundp 'redo)
181 :active (not (or (eq buffer-undo-list t) 177 :active (not (or (eq buffer-undo-list t)
182 (eq last-buffer-undo-list nil) 178 (eq last-buffer-undo-list nil)
183 (not (or (eq last-buffer-undo-list buffer-undo-list) 179 (not (or (eq last-buffer-undo-list buffer-undo-list)
184 (and (null (car-safe buffer-undo-list)) 180 (and (null (car-safe buffer-undo-list))
185 (eq last-buffer-undo-list 181 (eq last-buffer-undo-list
186 (cdr-safe buffer-undo-list))))) 182 (cdr-safe buffer-undo-list)))))
187 (or (eq buffer-undo-list pending-undo-list) 183 (or (eq buffer-undo-list pending-undo-list)
188 (eq (cdr buffer-undo-list) pending-undo-list)))) 184 (eq (cdr buffer-undo-list) pending-undo-list))))
189 :suffix (if (eq last-command 'redo) "More" "")] 185 :suffix (if (eq last-command 'redo) "More" "")]
186 "----"
187 ["Cu%_t" kill-primary-selection
188 :active (selection-owner-p)]
189 ["%_Copy" copy-primary-selection
190 :active (selection-owner-p)]
191 ["%_Paste" yank-clipboard-selection
192 :active (selection-exists-p 'CLIPBOARD)]
193 ["%_Delete" delete-primary-selection
194 :active (selection-owner-p)]
195 "----"
196 ["Select %_All" mark-whole-buffer]
197 ["Select Pa%_ge" mark-page]
198 ["Select Paragrap%_h" mark-paragraph]
199 ["Re%_select Region" activate-region :active (mark t)]
200 "----"
201 ["%_Find..." make-search-dialog]
202 ["R%_eplace..." query-replace]
203 ["Replace (Rege%_xp)..." query-replace-regexp]
204 ["List %_Matching Lines..." list-matching-lines]
205 )
206
207 ("%_View"
208 ["%_Split Window" split-window-vertically]
209 ["S%_plit Window (Side by Side)" split-window-horizontally]
210 ["%_Un-Split (Keep This)" delete-other-windows
211 :active (not (one-window-p t))]
212 ["Un-Split (Keep %_Others)" delete-window
213 :active (not (one-window-p t))]
214 ["Balance %_Windows" balance-windows
215 :active (not (one-window-p t))]
216 ["Shrink Window to %_Fit" shrink-window-if-larger-than-buffer]
217 "----"
218 ("N%_arrow"
219 ["%_Narrow to Region" narrow-to-region :active (region-exists-p)]
220 ["Narrow to %_Page" narrow-to-page]
221 ["Narrow to %_Defun" narrow-to-defun]
190 "----" 222 "----"
191 ["Cu%_t" kill-primary-selection 223 ["%_Widen" widen :active (or (/= (point-min) 1)
192 :active (selection-owner-p)] 224 (/= (point-max) (1+ (buffer-size))))]
193 ["%_Copy" copy-primary-selection
194 :active (selection-owner-p)]
195 ["%_Paste" yank-clipboard-selection
196 :active (selection-exists-p 'CLIPBOARD)]
197 ["%_Delete" delete-primary-selection
198 :active (selection-owner-p)]
199 "----"
200 ["Select %_All" mark-whole-buffer]
201 ["Select Pa%_ge" mark-page]
202 ["Select Paragrap%_h" mark-paragraph]
203 ["Re%_select Region" activate-region :active (mark t)]
204 "----"
205 ["%_Find..." make-search-dialog]
206 ["R%_eplace..." query-replace]
207 ["Replace (Rege%_xp)..." query-replace-regexp]
208 ["List %_Matching Lines..." list-matching-lines]
209 ) 225 )
210 226 "----"
211 ("%_View" 227 ["%_Goto Line..." goto-line]
212 ["%_Split Window" split-window-vertically] 228 ["Beginning of %_Defun" beginning-of-defun]
213 ["S%_plit Window (Side by Side)" split-window-horizontally] 229 ["%_End of Defun" end-of-defun]
214 ["%_Un-Split (Keep This)" delete-other-windows 230 ["%_Count Lines in Buffer" count-lines-buffer
215 :active (not (one-window-p t))] 231 :included (not (region-active-p))]
216 ["Un-Split (Keep %_Others)" delete-window 232 ["%_Count Lines in Region" count-lines-region
217 :active (not (one-window-p t))] 233 :included (region-active-p)]
218 ["Balance %_Windows" balance-windows 234 "----"
219 :active (not (one-window-p t))] 235 ["%_Jump to Previous Mark" (set-mark-command t)
220 ["Shrink Window to %_Fit" shrink-window-if-larger-than-buffer] 236 :active (mark t)]
221 "----" 237 ["Se%_t Bookmark" bookmark-set
222 ("N%_arrow" 238 :active (fboundp 'bookmark-set)]
223 ["%_Narrow to Region" narrow-to-region :active (region-exists-p)] 239 ("%_Bookmarks"
224 ["Narrow to %_Page" narrow-to-page] 240 :filter
225 ["Narrow to %_Defun" narrow-to-defun] 241 ,#'(lambda (menu)
226 "----" 242 (let ((alist (and-boundp 'bookmark-alist
227 ["%_Widen" widen :active (or (/= (point-min) 1) 243 bookmark-alist)))
228 (/= (point-max) (1+ (buffer-size))))] 244 (if (not alist)
229 ) 245 menu
230 "----" 246 (let ((items
231 ["%_Goto Line..." goto-line] 247 (submenu-generate-accelerator-spec
232 ["Beginning of %_Defun" beginning-of-defun] 248 (mapcar #'(lambda (bmk)
233 ["%_End of Defun" end-of-defun] 249 `[,bmk (bookmark-jump ',bmk)])
234 ["%_Count Lines in Buffer" count-lines-buffer 250 (bookmark-all-names)))))
235 :included (not (region-active-p))] 251 (append menu '("---") items)))))
236 ["%_Count Lines in Region" count-lines-region 252 "---"
237 :included (region-active-p)] 253 ["Insert %_Contents" bookmark-menu-insert
238 "----" 254 :active (fboundp 'bookmark-menu-insert)]
239 ["%_Jump to Previous Mark" (set-mark-command t) 255 ["Insert L%_ocation" bookmark-menu-locate
240 :active (mark t)] 256 :active (fboundp 'bookmark-menu-locate)]
241 ["Se%_t Bookmark" bookmark-set 257 "---"
242 :active (fboundp 'bookmark-set)] 258 ["%_Rename Bookmark" bookmark-menu-rename
243 ("%_Bookmarks" 259 :active (fboundp 'bookmark-menu-rename)]
244 :filter 260 ("%_Delete Bookmark"
245 (lambda (menu) 261 :filter ,#'(lambda (menu)
246 (let ((alist (and-boundp 'bookmark-alist
247 bookmark-alist)))
248 (if (not alist)
249 menu
250 (let ((items
251 (submenu-generate-accelerator-spec 262 (submenu-generate-accelerator-spec
252 (mapcar #'(lambda (bmk) 263 (mapcar #'(lambda (bmk)
253 `[,bmk (bookmark-jump ',bmk)]) 264 `[,bmk (bookmark-delete ',bmk)])
254 (bookmark-all-names))))) 265 (bookmark-all-names)))))
255 (append menu '("---") items))))) 266 ["%_Edit Bookmark List" bookmark-bmenu-list
256 "---" 267 :active (and-boundp 'bookmark-alist bookmark-alist)]
257 ["Insert %_Contents" bookmark-menu-insert 268 "---"
258 :active (fboundp 'bookmark-menu-insert)] 269 ["%_Save Bookmarks" bookmark-save
259 ["Insert L%_ocation" bookmark-menu-locate 270 :active (and-boundp 'bookmark-alist bookmark-alist)]
260 :active (fboundp 'bookmark-menu-locate)] 271 ["Save Bookmarks %_As..." bookmark-write
261 "---" 272 :active (and-boundp 'bookmark-alist bookmark-alist)]
262 ["%_Rename Bookmark" bookmark-menu-rename 273 ["%_Load a Bookmark File" bookmark-load
263 :active (fboundp 'bookmark-menu-rename)] 274 :active (fboundp 'bookmark-load)]
264 ("%_Delete Bookmark"
265 :filter (lambda (menu)
266 (submenu-generate-accelerator-spec
267 (mapcar #'(lambda (bmk)
268 `[,bmk (bookmark-delete ',bmk)])
269 (bookmark-all-names)))))
270 ["%_Edit Bookmark List" bookmark-bmenu-list
271 :active (and-boundp 'bookmark-alist bookmark-alist)]
272 "---"
273 ["%_Save Bookmarks" bookmark-save
274 :active (and-boundp 'bookmark-alist bookmark-alist)]
275 ["Save Bookmarks %_As..." bookmark-write
276 :active (and-boundp 'bookmark-alist bookmark-alist)]
277 ["%_Load a Bookmark File" bookmark-load
278 :active (fboundp 'bookmark-load)]
279 )
280 ) 275 )
276 )
281 277
282 ("C%_mds" 278 ("C%_mds"
283 ["Repeat Last Comple%_x Command..." repeat-complex-command] 279 ["Repeat Last Comple%_x Command..." repeat-complex-command]
284 ["E%_valuate Lisp Expression..." eval-expression] 280 ["E%_valuate Lisp Expression..." eval-expression]
285 ["Execute %_Named Command..." execute-extended-command] 281 ["Execute %_Named Command..." execute-extended-command]
282 "----"
283 ["Start %_Defining Macro" start-kbd-macro
284 :included (not defining-kbd-macro)]
285 ["Stop %_Defining Macro" end-kbd-macro
286 :included defining-kbd-macro]
287 ["%_Execute Last Macro" call-last-kbd-macro
288 :active last-kbd-macro]
289 ("Other %_Macro"
290 ["Edit %_Last Macro" edit-last-kbd-macro
291 :active last-kbd-macro]
292 ["%_Edit Macro..." edit-kbd-macro]
293 ["%_Append to Last Macro" (start-kbd-macro t)
294 :active (and (not defining-kbd-macro) last-kbd-macro)]
295 "---"
296 ["%_Name Last Macro..." name-last-kbd-macro
297 :active last-kbd-macro]
298 ["Assign Last Macro to %_Key..." assign-last-kbd-macro-to-key
299 :active (and last-kbd-macro
300 (fboundp 'assign-last-kbd-macro-to-key))]
301 "---"
302 ["E%_xecute Last Macro on Region Lines"
303 :active (and last-kbd-macro (region-exists-p))]
304 "---"
305 ["%_Query User During Macro" kbd-macro-query
306 :active defining-kbd-macro]
307 ["Enter %_Recursive Edit During Macro" (kbd-macro-query t)
308 :active defining-kbd-macro]
309 "---"
310 ["%_Insert Named Macro into Buffer..." insert-kbd-macro]
311 ["Read Macro from Re%_gion" read-kbd-macro
312 :active (region-exists-p)]
313 )
314 "----"
315 ["D%_ynamic Abbrev Expand" dabbrev-expand]
316 ["Define %_Global Abbrev for " add-global-abbrev
317 :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil)
318 40 nil nil t)]
319 ("Other %_Abbrev"
320 ["Dynamic Abbrev %_Complete" dabbrev-completion]
321 ["Dynamic Abbrev Complete in %_All Buffers" (dabbrev-completion 16)]
286 "----" 322 "----"
287 ["Start %_Defining Macro" start-kbd-macro
288 :included (not defining-kbd-macro)]
289 ["Stop %_Defining Macro" end-kbd-macro
290 :included defining-kbd-macro]
291 ["%_Execute Last Macro" call-last-kbd-macro
292 :active last-kbd-macro]
293 ("Other %_Macro"
294 ["Edit %_Last Macro" edit-last-kbd-macro
295 :active last-kbd-macro]
296 ["%_Edit Macro..." edit-kbd-macro]
297 ["%_Append to Last Macro" (start-kbd-macro t)
298 :active (and (not defining-kbd-macro) last-kbd-macro)]
299 "---"
300 ["%_Name Last Macro..." name-last-kbd-macro
301 :active last-kbd-macro]
302 ["Assign Last Macro to %_Key..." assign-last-kbd-macro-to-key
303 :active (and last-kbd-macro
304 (fboundp 'assign-last-kbd-macro-to-key))]
305 "---"
306 ["E%_xecute Last Macro on Region Lines"
307 :active (and last-kbd-macro (region-exists-p))]
308 "---"
309 ["%_Query User During Macro" kbd-macro-query
310 :active defining-kbd-macro]
311 ["Enter %_Recursive Edit During Macro" (kbd-macro-query t)
312 :active defining-kbd-macro]
313 "---"
314 ["%_Insert Named Macro into Buffer..." insert-kbd-macro]
315 ["Read Macro from Re%_gion" read-kbd-macro
316 :active (region-exists-p)]
317 )
318 "----" 323 "----"
319 ["D%_ynamic Abbrev Expand" dabbrev-expand] 324 ["%_Define Global Abbrev for " add-global-abbrev
320 ["Define %_Global Abbrev for " add-global-abbrev 325 :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil)
321 :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil)
322 40 nil nil t)] 326 40 nil nil t)]
323 ("Other %_Abbrev" 327 ["Define %_Mode-Specific Abbrev for " add-mode-abbrev
324 ["Dynamic Abbrev %_Complete" dabbrev-completion] 328 :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil)
325 ["Dynamic Abbrev Complete in %_All Buffers" (dabbrev-completion 16)]
326 "----"
327 "----"
328 ["%_Define Global Abbrev for " add-global-abbrev
329 :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil)
330 40 nil nil t)] 329 40 nil nil t)]
331 ["Define %_Mode-Specific Abbrev for " add-mode-abbrev 330 ["Define Global Ex%_pansion for " inverse-add-global-abbrev
332 :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil) 331 :suffix (truncate-string-to-width
333 40 nil nil t)]
334 ["Define Global Ex%_pansion for " inverse-add-global-abbrev
335 :suffix (truncate-string-to-width
336 (inverse-abbrev-string-to-be-defined 1) 332 (inverse-abbrev-string-to-be-defined 1)
337 40 nil nil t)] 333 40 nil nil t)]
338 ["Define Mode-Specific Expa%_nsion for " inverse-add-mode-abbrev 334 ["Define Mode-Specific Expa%_nsion for " inverse-add-mode-abbrev
339 :suffix (truncate-string-to-width 335 :suffix (truncate-string-to-width
340 (inverse-abbrev-string-to-be-defined 1) 336 (inverse-abbrev-string-to-be-defined 1)
341 40 nil nil t)] 337 40 nil nil t)]
342 "---" 338 "---"
343 ["E%_xpand Abbrev" expand-abbrev] 339 ["E%_xpand Abbrev" expand-abbrev]
344 ["Expand Abbrevs in Re%_gion" expand-region-abbrevs 340 ["Expand Abbrevs in Re%_gion" expand-region-abbrevs
345 :active (region-exists-p)] 341 :active (region-exists-p)]
346 ["%_Unexpand Last Abbrev" unexpand-abbrev 342 ["%_Unexpand Last Abbrev" unexpand-abbrev
347 :active (and (stringp last-abbrev-text) 343 :active (and (stringp last-abbrev-text)
348 (> last-abbrev-location 0))] 344 (> last-abbrev-location 0))]
349 "---" 345 "---"
350 ["%_Kill All Abbrevs" kill-all-abbrevs] 346 ["%_Kill All Abbrevs" kill-all-abbrevs]
351 ["%_Insert All Abbrevs into Buffer" insert-abbrevs] 347 ["%_Insert All Abbrevs into Buffer" insert-abbrevs]
352 ["%_List Abbrevs" list-abbrevs] 348 ["%_List Abbrevs" list-abbrevs]
353 "---" 349 "---"
354 ["%_Edit Abbrevs" edit-abbrevs] 350 ["%_Edit Abbrevs" edit-abbrevs]
355 ["%_Redefine Abbrevs from Buffer" edit-abbrevs-redefine 351 ["%_Redefine Abbrevs from Buffer" edit-abbrevs-redefine
356 :active (eq major-mode 'edit-abbrevs-mode)] 352 :active (eq major-mode 'edit-abbrevs-mode)]
357 "---" 353 "---"
358 ["%_Save Abbrevs As..." write-abbrev-file] 354 ["%_Save Abbrevs As..." write-abbrev-file]
359 ["L%_oad Abbrevs..." read-abbrev-file] 355 ["L%_oad Abbrevs..." read-abbrev-file]
360 ) 356 )
361 "---" 357 "---"
362 ["%_Cut Rectangle" kill-rectangle] 358 ["%_Cut Rectangle" kill-rectangle]
363 ["%_Prefix Rectangle..." string-rectangle] 359 ["%_Prefix Rectangle..." string-rectangle]
364 ("Other %_Rectangles/Register" 360 ("Other %_Rectangles/Register"
365 ["%_Yank Rectangle" yank-rectangle] 361 ["%_Yank Rectangle" yank-rectangle]
366 ["Rectangle %_to Register" copy-rectangle-to-register] 362 ["Rectangle %_to Register" copy-rectangle-to-register]
367 ["Rectangle %_from Register" insert-register] 363 ["Rectangle %_from Register" insert-register]
368 ["%_Delete Rectangle" clear-rectangle] 364 ["%_Delete Rectangle" clear-rectangle]
369 ["%_Open Rectangle" open-rectangle] 365 ["%_Open Rectangle" open-rectangle]
370 ["Rectangle %_Mousing" 366 ["Rectangle %_Mousing"
371 (customize-set-variable 'mouse-track-rectangle-p 367 (customize-set-variable 'mouse-track-rectangle-p
372 (not mouse-track-rectangle-p)) 368 (not mouse-track-rectangle-p))
373 :style toggle :selected mouse-track-rectangle-p] 369 :style toggle :selected mouse-track-rectangle-p]
374 "---" 370 "---"
375 ["%_Copy to Register..." copy-to-register :active (region-exists-p)] 371 ["%_Copy to Register..." copy-to-register :active (region-exists-p)]
376 ["%_Append to Register..." append-register :active (region-exists-p)] 372 ["%_Append to Register..." append-register :active (region-exists-p)]
377 ["%_Insert Register..." insert-register] 373 ["%_Insert Register..." insert-register]
378 "---" 374 "---"
379 ["%_Save Point to Register" point-to-register] 375 ["%_Save Point to Register" point-to-register]
380 ["%_Jump to Register" register-to-point] 376 ["%_Jump to Register" register-to-point]
381 ) 377 )
382 "---" 378 "---"
383 ["%_Sort Lines in Region" sort-lines :active (region-exists-p)] 379 ["%_Sort Lines in Region" sort-lines :active (region-exists-p)]
384 ["%_Uppercase Region or Word" upcase-region-or-word] 380 ["%_Uppercase Region or Word" upcase-region-or-word]
385 ["%_Lowercase Region or Word" downcase-region-or-word] 381 ["%_Lowercase Region or Word" downcase-region-or-word]
386 ["%_Indent Region or Balanced Expression" 382 ["%_Indent Region or Balanced Expression"
387 indent-region-or-balanced-expression] 383 indent-region-or-balanced-expression]
388 ["%_Fill Paragraph or Region" fill-paragraph-or-region] 384 ["%_Fill Paragraph or Region" fill-paragraph-or-region]
389 ("Other %_Text Commands" 385 ("Other %_Text Commands"
390 ["Sort %_Paragraphs in Region" sort-paragraphs :active (region-exists-p)] 386 ["Sort %_Paragraphs in Region" sort-paragraphs :active (region-exists-p)]
391 ["Sort Pa%_ges in Region" sort-pages :active (region-exists-p)] 387 ["Sort Pa%_ges in Region" sort-pages :active (region-exists-p)]
392 ["Sort C%_olumns in Region" sort-columns :active (region-exists-p)] 388 ["Sort C%_olumns in Region" sort-columns :active (region-exists-p)]
393 ["Sort %_Regexp..." sort-regexp-fields :active (region-exists-p)] 389 ["Sort %_Regexp..." sort-regexp-fields :active (region-exists-p)]
394 "---" 390 "---"
395 ["%_Capitalize Region" capitalize-region :active (region-exists-p)] 391 ["%_Capitalize Region" capitalize-region :active (region-exists-p)]
396 ["Title-C%_ase Region" capitalize-region-as-title 392 ["Title-C%_ase Region" capitalize-region-as-title
397 :active (region-exists-p)] 393 :active (region-exists-p)]
398 "----" 394 "----"
399 ["C%_enter Region or Paragraph" 395 ["C%_enter Region or Paragraph"
400 (if (region-active-p) (center-region) (center-line))] 396 (if (region-active-p) (center-region) (center-line))]
401 ["Center %_Line" center-line] 397 ["Center %_Line" center-line]
402 "---" 398 "---"
403 ["%_Indent Region Rigidly" indent-rigidly :active (region-exists-p)] 399 ["%_Indent Region Rigidly" indent-rigidly :active (region-exists-p)]
404 ["In%_dent To Column..." indent-to-column] 400 ["In%_dent To Column..." indent-to-column]
405 "---" 401 "---"
406 ["%_Untabify (Tabs to Spaces)" untabify :active (and (region-exists-p) 402 ["%_Untabify (Tabs to Spaces)" untabify :active (and (region-exists-p)
407 (fboundp 'untabify))] 403 (fboundp 'untabify))]
408 ["%_Tabify (Spaces to Tabs)" tabify :active (and (region-exists-p) 404 ["%_Tabify (Spaces to Tabs)" tabify :active (and (region-exists-p)
409 (fboundp 'tabify))] 405 (fboundp 'tabify))]
410 ["Tab to Tab %_Stop" tab-to-tab-stop] 406 ["Tab to Tab %_Stop" tab-to-tab-stop]
411 ["Edit Ta%_b Stops" edit-tab-stops] 407 ["Edit Ta%_b Stops" edit-tab-stops]
412 ) 408 )
413 "---" 409 "---"
414 ("%_Tags" 410 ("%_Tags"
415 ["%_Find Tag..." find-tag] 411 ["%_Find Tag..." find-tag]
416 ["Find %_Other Window..." find-tag-other-window] 412 ["Find %_Other Window..." find-tag-other-window]
417 ["%_Next Tag..." (find-tag nil)] 413 ["%_Next Tag..." (find-tag nil)]
418 ["N%_ext Other Window..." (find-tag-other-window nil)] 414 ["N%_ext Other Window..." (find-tag-other-window nil)]
419 ["Next %_File" next-file] 415 ["Next %_File" next-file]
420 "-----" 416 "-----"
421 ["Tags %_Search..." tags-search] 417 ["Tags %_Search..." tags-search]
422 ["Tags %_Replace..." tags-query-replace] 418 ["Tags %_Replace..." tags-query-replace]
423 ["%_Continue Search/Replace" tags-loop-continue] 419 ["%_Continue Search/Replace" tags-loop-continue]
424 "-----" 420 "-----"
425 ["%_Pop stack" pop-tag-mark] 421 ["%_Pop stack" pop-tag-mark]
426 ["%_Apropos..." tags-apropos] 422 ["%_Apropos..." tags-apropos]
427 "-----" 423 "-----"
428 ["%_Set Tags Table File..." visit-tags-table] 424 ["%_Set Tags Table File..." visit-tags-table]
429 ) 425 )
430 ) 426 )
431 427
432 ;; #### Delete this entire menu as soon as the new package source is 428 ;; #### Delete this entire menu as soon as the new package source is
433 ;; committed. 429 ;; committed.
434 ("%_Tools" 430 ("%_Tools"
435 ("%_Packages" 431 ("%_Packages"
436 ("%_Set Download Site" 432 ("%_Set Download Site"
437 ("%_Official Releases" 433 ("%_Official Releases"
438 :filter (lambda (&rest junk) 434 :filter ,#'(lambda (&rest junk)
439 (menu-split-long-menu 435 (menu-split-long-menu
440 (submenu-generate-accelerator-spec 436 (submenu-generate-accelerator-spec
441 (package-ui-download-menu))))) 437 (package-ui-download-menu)))))
442 ("%_Pre-Releases" 438 ("%_Pre-Releases"
443 :filter (lambda (&rest junk) 439 :filter ,#'(lambda (&rest junk)
444 (menu-split-long-menu 440 (menu-split-long-menu
445 (submenu-generate-accelerator-spec 441 (submenu-generate-accelerator-spec
446 (package-ui-pre-release-download-menu))))) 442 (package-ui-pre-release-download-menu)))))
447 ("%_Site Releases" 443 ("%_Site Releases"
448 :filter (lambda (&rest junk) 444 :filter ,#'(lambda (&rest junk)
449 (menu-split-long-menu 445 (menu-split-long-menu
450 (submenu-generate-accelerator-spec 446 (submenu-generate-accelerator-spec
451 (package-ui-site-release-download-menu)))))) 447 (package-ui-site-release-download-menu))))))
452 "--:shadowEtchedIn" 448 "--:shadowEtchedIn"
453 ["%_Update Package Index" package-get-update-base] 449 ["%_Update Package Index" package-get-update-base]
454 ["%_List and Install" pui-list-packages] 450 ["%_List and Install" pui-list-packages]
455 ["U%_pdate Installed Packages" package-get-update-all] 451 ["U%_pdate Installed Packages" package-get-update-all]
456 ["%_Help" (Info-goto-node "(xemacs)Packages")]) 452 ["%_Help" (Info-goto-node "(xemacs)Packages")])
457 ("%_Internet" 453 ("%_Internet"
458 ["Read Mail %_1 (VM)..." vm 454 ["Read Mail %_1 (VM)..." vm
459 :active (fboundp 'vm)] 455 :active (fboundp 'vm)]
460 ["Read Mail %_2 (MH)..." (mh-rmail t) 456 ["Read Mail %_2 (MH)..." (mh-rmail t)
461 :active (fboundp 'mh-rmail)] 457 :active (fboundp 'mh-rmail)]
462 ["Send %_Mail..." compose-mail 458 ["Send %_Mail..." compose-mail
463 :active (fboundp 'compose-mail)] 459 :active (fboundp 'compose-mail)]
464 ["Usenet %_News" gnus 460 ["Usenet %_News" gnus
465 :active (fboundp 'gnus)] 461 :active (fboundp 'gnus)]
466 ["Browse the %_Web" w3 462 ["Browse the %_Web" w3
467 :active (fboundp 'w3)]) 463 :active (fboundp 'w3)])
468 "---" 464 "---"
469 ("%_Grep" 465 ("%_Grep"
470 :filter 466 :filter
471 (lambda (menu) 467 ,#'(lambda (menu)
472 (if (or (not (boundp 'grep-history)) (null grep-history)) 468 (if-boundp 'grep-history
473 menu 469 (if grep-history
474 (let ((items 470 (let ((items
475 (submenu-generate-accelerator-spec 471 (submenu-generate-accelerator-spec
476 (mapcar #'(lambda (label-value) 472 (mapcar #'(lambda (label-value)
477 (vector (first label-value) 473 (vector (first label-value)
478 (list 'grep (second label-value)))) 474 (list 'grep
479 (Menubar-items-truncate-history 475 (second label-value))))
480 grep-history 10 50))))) 476 (Menubar-items-truncate-history
481 (append menu '("---") items)))) 477 grep-history 10 50)))))
482 ["%_Grep..." grep :active (fboundp 'grep)] 478 (append menu '("---") items))
483 ["%_Kill Grep" kill-compilation 479 menu)
484 :active (and (fboundp 'kill-compilation) 480 menu))
485 (fboundp 'compilation-find-buffer) 481 ["%_Grep..." grep :active (fboundp 'grep)]
486 (let ((buffer (condition-case nil 482 ["%_Kill Grep" kill-compilation
487 (compilation-find-buffer) 483 :active (and (fboundp 'kill-compilation)
488 (error nil)))) 484 (fboundp 'compilation-find-buffer)
489 (and buffer (get-buffer-process buffer))))] 485 (let ((buffer (condition-case nil
490 "---" 486 (compilation-find-buffer)
491 ["Grep %_All Files in Current Directory..." 487 (error nil))))
492 grep-all-files-in-current-directory 488 (and buffer (get-buffer-process buffer))))]
493 :active (fboundp 'grep-all-files-in-current-directory)] 489 "---"
494 ["Grep All Files in Current Directory %_Recursively..." 490 ["Grep %_All Files in Current Directory..."
495 grep-all-files-in-current-directory-and-below 491 grep-all-files-in-current-directory
496 :active (fboundp 'grep-all-files-in-current-directory-and-below)] 492 :active (fboundp 'grep-all-files-in-current-directory)]
497 "---" 493 ["Grep All Files in Current Directory %_Recursively..."
498 ["Grep %_C and C Header Files in Current Directory..." 494 grep-all-files-in-current-directory-and-below
499 (progn 495 :active (fboundp 'grep-all-files-in-current-directory-and-below)]
500 (require 'compile) 496 "---"
501 (let ((grep-command 497 ["Grep %_C and C Header Files in Current Directory..."
502 (cons (concat grep-command " *.[chCH]" 498 (progn
499 (require 'compile)
500 (let ((grep-command
501 (cons (concat grep-command " *.[chCH]"
503 ; i wanted to also use *.cc and *.hh. 502 ; i wanted to also use *.cc and *.hh.
504 ; see long comment below under Perl. 503 ; see long comment below under Perl.
505 ) 504 )
506 (length grep-command)))) 505 (length grep-command))))
507 (call-interactively 'grep))) 506 (call-interactively 'grep)))
508 :active (fboundp 'grep)] 507 :active (fboundp 'grep)]
509 ["Grep C Hea%_der Files in Current Directory..." 508 ["Grep C Hea%_der Files in Current Directory..."
510 (progn 509 (progn
511 (require 'compile) 510 (require 'compile)
512 (let ((grep-command 511 (let ((grep-command
513 (cons (concat grep-command " *.[hH]" 512 (cons (concat grep-command " *.[hH]"
514 ; i wanted to also use *.hh. 513 ; i wanted to also use *.hh.
515 ; see long comment below under Perl. 514 ; see long comment below under Perl.
516 ) 515 )
517 (length grep-command)))) 516 (length grep-command))))
518 (call-interactively 'grep))) 517 (call-interactively 'grep)))
519 :active (fboundp 'grep)] 518 :active (fboundp 'grep)]
520 ["Grep %_E-Lisp Files in Current Directory..." 519 ["Grep %_E-Lisp Files in Current Directory..."
521 (progn 520 (progn
522 (require 'compile) 521 (require 'compile)
523 (let ((grep-command 522 (let ((grep-command
524 (cons (concat grep-command " *.el") 523 (cons (concat grep-command " *.el")
525 (length grep-command)))) 524 (length grep-command))))
526 (call-interactively 'grep))) 525 (call-interactively 'grep)))
527 :active (fboundp 'grep)] 526 :active (fboundp 'grep)]
528 ["Grep %_Perl Files in Current Directory..." 527 ["Grep %_Perl Files in Current Directory..."
529 (progn 528 (progn
530 (require 'compile) 529 (require 'compile)
531 (let ((grep-command 530 (let ((grep-command
532 (cons (concat grep-command " *.pl" 531 (cons (concat grep-command " *.pl"
533 ; i wanted to use this: 532 ; i wanted to use this:
534 ; " *.pl *.pm *.am" 533 ; " *.pl *.pm *.am"
535 ; but grep complains if it can't 534 ; but grep complains if it can't
536 ; match anything in a glob, and 535 ; match anything in a glob, and
537 ; that screws other things up. 536 ; that screws other things up.
538 ; perhaps we need to first scan 537 ; perhaps we need to first scan
539 ; each separate glob in the directory 538 ; each separate glob in the directory
540 ; to see if there are any files in 539 ; to see if there are any files in
541 ; that glob, and if not, omit it. 540 ; that glob, and if not, omit it.
542 ) 541 )
543 (length grep-command)))) 542 (length grep-command))))
544 (call-interactively 'grep))) 543 (call-interactively 'grep)))
545 :active (fboundp 'grep)] 544 :active (fboundp 'grep)]
546 ["Grep %_HTML Files in Current Directory..." 545 ["Grep %_HTML Files in Current Directory..."
547 (progn 546 (progn
548 (require 'compile) 547 (require 'compile)
549 (let ((grep-command 548 (let ((grep-command
550 (cons (concat grep-command " *.*htm*") 549 (cons (concat grep-command " *.*htm*")
551 (length grep-command)))) 550 (length grep-command))))
552 (call-interactively 'grep))) 551 (call-interactively 'grep)))
553 :active (fboundp 'grep)] 552 :active (fboundp 'grep)]
554 "---" 553 "---"
555 ["%_Next Match" next-error 554 ["%_Next Match" next-error
556 :active (and (fboundp 'compilation-errors-exist-p) 555 :active (and (fboundp 'compilation-errors-exist-p)
557 (compilation-errors-exist-p))] 556 (compilation-errors-exist-p))]
558 ["Pre%_vious Match" previous-error 557 ["Pre%_vious Match" previous-error
559 :active (and (fboundp 'compilation-errors-exist-p) 558 :active (and (fboundp 'compilation-errors-exist-p)
560 (compilation-errors-exist-p))] 559 (compilation-errors-exist-p))]
561 ["%_First Match" first-error 560 ["%_First Match" first-error
562 :active (and (fboundp 'compilation-errors-exist-p) 561 :active (and (fboundp 'compilation-errors-exist-p)
563 (compilation-errors-exist-p))] 562 (compilation-errors-exist-p))]
564 ["G%_oto Match" compile-goto-error 563 ["G%_oto Match" compile-goto-error
565 :active (and (fboundp 'compilation-errors-exist-p) 564 :active (and (fboundp 'compilation-errors-exist-p)
566 (compilation-errors-exist-p))] 565 (compilation-errors-exist-p))]
567 "---" 566 "---"
568 ["%_Set Grep Command..." 567 ["%_Set Grep Command..."
569 (progn 568 (progn
570 (require 'compile) 569 (require 'compile)
571 (customize-set-variable 570 (customize-set-variable
572 'grep-command 571 'grep-command
573 (read-shell-command "Default Grep Command: " grep-command))) 572 (read-shell-command "Default Grep Command: " grep-command)))
574 :active (fboundp 'grep) 573 :active (fboundp 'grep)
575 ] 574 ]
576 ) 575 )
577 ("%_Compile" 576 ("%_Compile"
578 :filter 577 :filter
579 (lambda (menu) 578 ,#'(lambda (menu)
580 (if (or (not (boundp 'compile-history)) (null compile-history)) 579 (if-boundp 'compile-history
581 menu 580 (if compile-history
582 (let ((items 581 (let ((items
583 (submenu-generate-accelerator-spec 582 (submenu-generate-accelerator-spec
584 (mapcar #'(lambda (label-value) 583 (mapcar #'(lambda (label-value)
585 (vector (first label-value) 584 (vector (first label-value)
586 (list 'compile (second label-value)))) 585 (list 'compile
587 (Menubar-items-truncate-history 586 (second label-value))))
588 compile-history 10 50))))) 587 (Menubar-items-truncate-history
589 (append menu '("---") items)))) 588 compile-history 10 50)))))
590 ["%_Compile..." compile :active (fboundp 'compile)] 589 (append menu '("---") items))
591 ["%_Repeat Compilation" recompile :active (fboundp 'recompile)] 590 menu)
592 ["%_Kill Compilation" kill-compilation 591 menu))
593 :active (and (fboundp 'kill-compilation) 592 ["%_Compile..." compile :active (fboundp 'compile)]
594 (fboundp 'compilation-find-buffer) 593 ["%_Repeat Compilation" recompile :active (fboundp 'recompile)]
595 (let ((buffer (condition-case nil 594 ["%_Kill Compilation" kill-compilation
596 (compilation-find-buffer) 595 :active (and (fboundp 'kill-compilation)
597 (error nil)))) 596 (fboundp 'compilation-find-buffer)
598 (and buffer (get-buffer-process buffer))))] 597 (let ((buffer (condition-case nil
599 "---" 598 (compilation-find-buffer)
600 ["%_Next Error" next-error 599 (error nil))))
601 :active (and (fboundp 'compilation-errors-exist-p) 600 (and buffer (get-buffer-process buffer))))]
602 (compilation-errors-exist-p))] 601 "---"
603 ["Pre%_vious Error" previous-error 602 ["%_Next Error" next-error
604 :active (and (fboundp 'compilation-errors-exist-p) 603 :active (and (fboundp 'compilation-errors-exist-p)
605 (compilation-errors-exist-p))] 604 (compilation-errors-exist-p))]
606 ["%_First Error" first-error 605 ["Pre%_vious Error" previous-error
607 :active (and (fboundp 'compilation-errors-exist-p) 606 :active (and (fboundp 'compilation-errors-exist-p)
608 (compilation-errors-exist-p))] 607 (compilation-errors-exist-p))]
609 ["G%_oto Error" compile-goto-error 608 ["%_First Error" first-error
610 :active (and (fboundp 'compilation-errors-exist-p) 609 :active (and (fboundp 'compilation-errors-exist-p)
611 (compilation-errors-exist-p))] 610 (compilation-errors-exist-p))]
612 ) 611 ["G%_oto Error" compile-goto-error
613 ("%_Debug" 612 :active (and (fboundp 'compilation-errors-exist-p)
614 ["%_GDB..." gdb 613 (compilation-errors-exist-p))]
615 :active (fboundp 'gdb)] 614 )
616 ["%_DBX..." dbx 615 ("%_Debug"
617 :active (fboundp 'dbx)]) 616 ["%_GDB..." gdb
618 ("%_Shell" 617 :active (fboundp 'gdb)]
619 ["%_Shell" shell 618 ["%_DBX..." dbx
620 :active (fboundp 'shell)] 619 :active (fboundp 'dbx)])
621 ["S%_hell Command..." shell-command 620 ("%_Shell"
622 :active (fboundp 'shell-command)] 621 ["%_Shell" shell
623 ["Shell Command on %_Region..." shell-command-on-region 622 :active (fboundp 'shell)]
623 ["S%_hell Command..." shell-command
624 :active (fboundp 'shell-command)]
625 ["Shell Command on %_Region..." shell-command-on-region
624 :active (and (fboundp 'shell-command-on-region) (region-exists-p))]) 626 :active (and (fboundp 'shell-command-on-region) (region-exists-p))])
625 627
626 ("%_Tags" 628 ("%_Tags"
627 ["%_Find Tag..." find-tag] 629 ["%_Find Tag..." find-tag]
628 ["Find %_Other Window..." find-tag-other-window] 630 ["Find %_Other Window..." find-tag-other-window]
629 ["%_Next Tag..." (find-tag nil)] 631 ["%_Next Tag..." (find-tag nil)]
630 ["N%_ext Other Window..." (find-tag-other-window nil)] 632 ["N%_ext Other Window..." (find-tag-other-window nil)]
631 ["Next %_File" next-file] 633 ["Next %_File" next-file]
632 "-----" 634 "-----"
633 ["Tags %_Search..." tags-search] 635 ["Tags %_Search..." tags-search]
634 ["Tags %_Replace..." tags-query-replace] 636 ["Tags %_Replace..." tags-query-replace]
635 ["%_Continue Search/Replace" tags-loop-continue] 637 ["%_Continue Search/Replace" tags-loop-continue]
636 "-----" 638 "-----"
637 ["%_Pop stack" pop-tag-mark] 639 ["%_Pop stack" pop-tag-mark]
638 ["%_Apropos..." tags-apropos] 640 ["%_Apropos..." tags-apropos]
639 "-----" 641 "-----"
640 ["%_Set Tags Table File..." visit-tags-table] 642 ["%_Set Tags Table File..." visit-tags-table]
641 )
642
643 "----"
644
645 ("Ca%_lendar"
646 ["%_3-Month Calendar" calendar
647 :active (fboundp 'calendar)]
648 ["%_Diary" diary
649 :active (fboundp 'diary)]
650 ["%_Holidays" holidays
651 :active (fboundp 'holidays)]
652 ;; we're all pagans at heart ...
653 ["%_Phases of the Moon" phases-of-moon
654 :active (fboundp 'phases-of-moon)]
655 ["%_Sunrise/Sunset" sunrise-sunset
656 :active (fboundp 'sunrise-sunset)])
657
658 ("Ga%_mes"
659 ["%_Mine Game" xmine
660 :active (fboundp 'xmine)]
661 ["%_Tetris" tetris
662 :active (fboundp 'tetris)]
663 ["%_Sokoban" sokoban
664 :active (fboundp 'sokoban)]
665 ["Quote from %_Zippy" yow
666 :active (fboundp 'yow)]
667 ["%_Psychoanalyst" doctor
668 :active (fboundp 'doctor)]
669 ["Ps%_ychoanalyze Zippy!" psychoanalyze-pinhead
670 :active (fboundp 'psychoanalyze-pinhead)]
671 ["%_Random Flames" flame
672 :active (fboundp 'flame)]
673 ["%_Dunnet (Adventure)" dunnet
674 :active (fboundp 'dunnet)]
675 ["Towers of %_Hanoi" hanoi
676 :active (fboundp 'hanoi)]
677 ["Game of %_Life" life
678 :active (fboundp 'life)]
679 ["M%_ultiplication Puzzle" mpuz
680 :active (fboundp 'mpuz)])
681
682 "----"
683 ) 643 )
644
645 "----"
646
647 ("Ca%_lendar"
648 ["%_3-Month Calendar" calendar
649 :active (fboundp 'calendar)]
650 ["%_Diary" diary
651 :active (fboundp 'diary)]
652 ["%_Holidays" holidays
653 :active (fboundp 'holidays)]
654 ;; we're all pagans at heart ...
655 ["%_Phases of the Moon" phases-of-moon
656 :active (fboundp 'phases-of-moon)]
657 ["%_Sunrise/Sunset" sunrise-sunset
658 :active (fboundp 'sunrise-sunset)])
659
660 ("Ga%_mes"
661 ["%_Mine Game" xmine
662 :active (fboundp 'xmine)]
663 ["%_Tetris" tetris
664 :active (fboundp 'tetris)]
665 ["%_Sokoban" sokoban
666 :active (fboundp 'sokoban)]
667 ["Quote from %_Zippy" yow
668 :active (fboundp 'yow)]
669 ["%_Psychoanalyst" doctor
670 :active (fboundp 'doctor)]
671 ["Ps%_ychoanalyze Zippy!" psychoanalyze-pinhead
672 :active (fboundp 'psychoanalyze-pinhead)]
673 ["%_Random Flames" flame
674 :active (fboundp 'flame)]
675 ["%_Dunnet (Adventure)" dunnet
676 :active (fboundp 'dunnet)]
677 ["Towers of %_Hanoi" hanoi
678 :active (fboundp 'hanoi)]
679 ["Game of %_Life" life
680 :active (fboundp 'life)]
681 ["M%_ultiplication Puzzle" mpuz
682 :active (fboundp 'mpuz)])
683
684 "----"
685 )
684 686
685 ; ("%_Tools" 687 ; ("%_Tools"
686 ; :filter behavior-menu-filter) 688 ; :filter behavior-menu-filter)
687 689
688 ("%_Options" 690 ("%_Options"
689 ("%_Advanced (Customize)" 691 ("%_Advanced (Customize)"
690 ("%_Emacs" :filter (lambda (&rest junk) 692 ("%_Emacs" :filter ,#'(lambda (&rest junk)
691 (cdr (custom-menu-create 'emacs)))) 693 (cdr (custom-menu-create 'emacs))))
692 ["%_Group..." customize-group] 694 ["%_Group..." customize-group]
693 ["%_Variable..." customize-variable] 695 ["%_Variable..." customize-variable]
694 ["%_Face..." customize-face] 696 ["%_Face..." customize-face]
695 ["%_Saved..." customize-saved] 697 ["%_Saved..." customize-saved]
696 ["Se%_t..." customize-customized] 698 ["Se%_t..." customize-customized]
697 ["%_Apropos..." customize-apropos] 699 ["%_Apropos..." customize-apropos]
698 ["%_Browse..." customize-browse]) 700 ["%_Browse..." customize-browse])
699 "---" 701 "---"
700 ("%_Editing" 702 ("%_Editing"
701 ["This Buffer %_Read Only" (toggle-read-only) 703 ["This Buffer %_Read Only" (toggle-read-only)
702 :style toggle :selected buffer-read-only] 704 :style toggle :selected buffer-read-only]
703 ["%_Yank/Kill Interact With Clipboard" 705 ["%_Yank/Kill Interact With Clipboard"
704 (if (eq interprogram-cut-function 'own-clipboard) 706 (if (eq interprogram-cut-function 'own-clipboard)
705 (progn 707 (progn
706 (customize-set-variable 'interprogram-cut-function nil) 708 (customize-set-variable 'interprogram-cut-function nil)
707 (customize-set-variable 'interprogram-paste-function nil)) 709 (customize-set-variable 'interprogram-paste-function nil))
708 (customize-set-variable 'interprogram-cut-function 'own-clipboard) 710 (customize-set-variable 'interprogram-cut-function 'own-clipboard)
709 (customize-set-variable 'interprogram-paste-function 'get-clipboard)) 711 (customize-set-variable 'interprogram-paste-function 'get-clipboard))
710 :style toggle 712 :style toggle
711 :selected (eq interprogram-cut-function 'own-clipboard)] 713 :selected (eq interprogram-cut-function 'own-clipboard)]
712 ["%_Overstrike" 714 ["%_Overstrike"
713 (progn 715 (progn
714 (setq overwrite-mode (if overwrite-mode nil 'overwrite-mode-textual)) 716 (setq overwrite-mode (if overwrite-mode nil 'overwrite-mode-textual))
715 (customize-set-variable 'overwrite-mode overwrite-mode)) 717 (customize-set-variable 'overwrite-mode overwrite-mode))
716 :style toggle :selected overwrite-mode] 718 :style toggle :selected overwrite-mode]
717 ["%_Abbrev Mode" 719 ["%_Abbrev Mode"
718 (customize-set-variable 'abbrev-mode 720 (customize-set-variable 'abbrev-mode
719 (not (default-value 'abbrev-mode))) 721 (not (default-value 'abbrev-mode)))
720 :style toggle 722 :style toggle
721 :selected (default-value 'abbrev-mode)] 723 :selected (default-value 'abbrev-mode)]
722 ["Active Re%_gions" 724 ["Active Re%_gions"
723 (customize-set-variable 'zmacs-regions (not zmacs-regions)) 725 (customize-set-variable 'zmacs-regions (not zmacs-regions))
724 :style toggle :selected zmacs-regions] 726 :style toggle :selected zmacs-regions]
725 "---" 727 "---"
726 ["%_Case Sensitive Search" 728 ["%_Case Sensitive Search"
727 (customize-set-variable 'case-fold-search 729 (customize-set-variable 'case-fold-search
728 (setq case-fold-search (not case-fold-search))) 730 (setq case-fold-search (not case-fold-search)))
729 :style toggle :selected (not case-fold-search)] 731 :style toggle :selected (not case-fold-search)]
730 ["Case %_Matching Replace" 732 ["Case %_Matching Replace"
731 (customize-set-variable 'case-replace (not case-replace)) 733 (customize-set-variable 'case-replace (not case-replace))
732 :style toggle :selected case-replace] 734 :style toggle :selected case-replace]
733 "---" 735 "---"
734 ("%_Newline at End of File..." 736 ("%_Newline at End of File..."
735 ["%_Don't Require" 737 ["%_Don't Require"
736 (customize-set-variable 'require-final-newline nil) 738 (customize-set-variable 'require-final-newline nil)
737 :style radio :selected (not require-final-newline)] 739 :style radio :selected (not require-final-newline)]
738 ["%_Require" 740 ["%_Require"
739 (customize-set-variable 'require-final-newline t) 741 (customize-set-variable 'require-final-newline t)
740 :style radio :selected (eq require-final-newline t)] 742 :style radio :selected (eq require-final-newline t)]
741 ["%_Ask" 743 ["%_Ask"
742 (customize-set-variable 'require-final-newline 'ask) 744 (customize-set-variable 'require-final-newline 'ask)
743 :style radio :selected (and require-final-newline 745 :style radio :selected (and require-final-newline
744 (not (eq require-final-newline t)))]) 746 (not (eq require-final-newline t)))])
745 ["Add Newline When Moving Past %_End" 747 ["Add Newline When Moving Past %_End"
746 (customize-set-variable 'next-line-add-newlines 748 (customize-set-variable 'next-line-add-newlines
747 (not next-line-add-newlines)) 749 (not next-line-add-newlines))
748 :style toggle :selected next-line-add-newlines]) 750 :style toggle :selected next-line-add-newlines])
749 ("%_Keyboard and Mouse" 751 ("%_Keyboard and Mouse"
750 ["%_Delete Key Deletes Selection" 752 ["%_Delete Key Deletes Selection"
751 (customize-set-variable 'pending-delete-mode (not pending-delete-mode)) 753 (customize-set-variable 'pending-delete-mode (not pending-delete-mode))
752 :style toggle 754 :style toggle
753 :selected (and (boundp 'pending-delete-mode) pending-delete-mode) 755 :selected (and (boundp 'pending-delete-mode) pending-delete-mode)
754 :active (boundp 'pending-delete-mode)] 756 :active (boundp 'pending-delete-mode)]
755 ["`kill-%_word' Stores in Clipboard" 757 ["`kill-%_word' Stores in Clipboard"
756 (customize-set-variable 'kill-word-into-kill-ring 758 (customize-set-variable 'kill-word-into-kill-ring
757 (not kill-word-into-kill-ring)) 759 (not kill-word-into-kill-ring))
758 :style toggle 760 :style toggle
759 :selected kill-word-into-kill-ring] 761 :selected kill-word-into-kill-ring]
760 ["`kill-%_line' Kills Whole Line at Beg" 762 ["`kill-%_line' Kills Whole Line at Beg"
761 (customize-set-variable 'kill-whole-line (not kill-whole-line)) 763 (customize-set-variable 'kill-whole-line (not kill-whole-line))
762 :style toggle 764 :style toggle
763 :selected kill-whole-line] 765 :selected kill-whole-line]
764 ["Size for %_Block-Movement Commands..." 766 ["Size for %_Block-Movement Commands..."
765 (customize-set-variable 'block-movement-size 767 (customize-set-variable 'block-movement-size
766 (read-number "Block Movement Size: " 768 (read-number "Block Movement Size: "
767 t block-movement-size))] 769 t block-movement-size))]
768 ["%_VI Emulation" 770 ["%_VI Emulation"
769 (progn 771 (progn
770 (toggle-viper-mode) 772 (toggle-viper-mode)
771 (customize-set-variable 'viper-mode viper-mode)) 773 (customize-set-variable 'viper-mode viper-mode))
772 :style toggle :selected (and (boundp 'viper-mode) viper-mode) 774 :style toggle :selected (and (boundp 'viper-mode) viper-mode)
773 :active (fboundp 'toggle-viper-mode)] 775 :active (fboundp 'toggle-viper-mode)]
774 "----" 776 "----"
775 ["S%_hifted Motion Keys Select Region" 777 ["S%_hifted Motion Keys Select Region"
776 (customize-set-variable 'shifted-motion-keys-select-region 778 (customize-set-variable 'shifted-motion-keys-select-region
777 (not shifted-motion-keys-select-region)) 779 (not shifted-motion-keys-select-region))
778 :style toggle 780 :style toggle
779 :selected shifted-motion-keys-select-region] 781 :selected shifted-motion-keys-select-region]
780 ["%_After Shifted Motion, Unshifted Motion Keys Deselect" 782 ["%_After Shifted Motion, Unshifted Motion Keys Deselect"
781 (customize-set-variable 'unshifted-motion-keys-deselect-region 783 (customize-set-variable 'unshifted-motion-keys-deselect-region
782 (not unshifted-motion-keys-deselect-region)) 784 (not unshifted-motion-keys-deselect-region))
783 :style toggle 785 :style toggle
784 :selected unshifted-motion-keys-deselect-region] 786 :selected unshifted-motion-keys-deselect-region]
785 "----" 787 "----"
786 ["%_Set Key..." global-set-key] 788 ["%_Set Key..." global-set-key]
787 ["%_Unset Key..." global-unset-key] 789 ["%_Unset Key..." global-unset-key]
788 "---" 790 "---"
789 ["%_Mouse Paste at Text Cursor (not Clicked Location)" 791 ["%_Mouse Paste at Text Cursor (not Clicked Location)"
790 (customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point)) 792 (customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point))
791 :style toggle :selected mouse-yank-at-point] 793 :style toggle :selected mouse-yank-at-point]
792 "---" 794 "---"
793 ["%_Teach Extended Commands" 795 ["%_Teach Extended Commands"
794 (customize-set-variable 'teach-extended-commands-p 796 (customize-set-variable 'teach-extended-commands-p
795 (not teach-extended-commands-p)) 797 (not teach-extended-commands-p))
796 :style toggle :selected teach-extended-commands-p] 798 :style toggle :selected teach-extended-commands-p]
799 )
800 ("%_Printing"
801 ["Set Printer %_Name for Generic Print Support..."
802 (customize-set-variable
803 'printer-name
804 (read-string "Set printer name: " printer-name))]
805 "---"
806 ["Command-Line %_Switches for `lpr'/`lp'..."
807 ;; better to directly open a customization buffer, since the value
808 ;; must be a list of strings, which is somewhat complex to prompt for.
809 (customize-variable 'lpr-switches)
810 (boundp 'lpr-switches)]
811 ("%_Pretty-Print Paper Size"
812 ["%_Letter"
813 (customize-set-variable 'ps-paper-type 'letter)
814 :style radio
815 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'letter))
816 :active (boundp 'ps-paper-type)]
817 ["Lette%_r-Small"
818 (customize-set-variable 'ps-paper-type 'letter-small)
819 :style radio
820 :selected (and (boundp 'ps-paper-type)
821 (eq ps-paper-type 'letter-small))
822 :active (boundp 'ps-paper-type)]
823 ["Le%_gal"
824 (customize-set-variable 'ps-paper-type 'legal)
825 :style radio
826 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'legal))
827 :active (boundp 'ps-paper-type)]
828 ["%_Statement"
829 (customize-set-variable 'ps-paper-type 'statement)
830 :style radio
831 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'statement))
832 :active (boundp 'ps-paper-type)]
833 ["%_Executive"
834 (customize-set-variable 'ps-paper-type 'executive)
835 :style radio
836 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'executive))
837 :active (boundp 'ps-paper-type)]
838 ["%_Tabloid"
839 (customize-set-variable 'ps-paper-type 'tabloid)
840 :style radio
841 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'tabloid))
842 :active (boundp 'ps-paper-type)]
843 ["Le%_dger"
844 (customize-set-variable 'ps-paper-type 'ledger)
845 :style radio
846 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'ledger))
847 :active (boundp 'ps-paper-type)]
848 ["A%_3"
849 (customize-set-variable 'ps-paper-type 'a3)
850 :style radio
851 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a3))
852 :active (boundp 'ps-paper-type)]
853 ["%_A4"
854 (customize-set-variable 'ps-paper-type 'a4)
855 :style radio
856 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4))
857 :active (boundp 'ps-paper-type)]
858 ["A4s%_mall"
859 (customize-set-variable 'ps-paper-type 'a4small)
860 :style radio
861 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4small))
862 :active (boundp 'ps-paper-type)]
863 ["B%_4"
864 (customize-set-variable 'ps-paper-type 'b4)
865 :style radio
866 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b4))
867 :active (boundp 'ps-paper-type)]
868 ["%_B5"
869 (customize-set-variable 'ps-paper-type 'b5)
870 :style radio
871 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b5))
872 :active (boundp 'ps-paper-type)]
797 ) 873 )
798 ("%_Printing" 874 ["%_Color Printing"
799 ["Set Printer %_Name for Generic Print Support..." 875 (cond (ps-print-color-p
800 (customize-set-variable 876 (customize-set-variable 'ps-print-color-p nil)
801 'printer-name 877 ;; I'm wondering whether all this muck is useful.
802 (read-string "Set printer name: " printer-name))] 878 (and (boundp 'original-face-background)
803 "---" 879 original-face-background
804 ["Command-Line %_Switches for `lpr'/`lp'..." 880 (set-face-background 'default original-face-background)))
805 ;; better to directly open a customization buffer, since the value 881 (t
806 ;; must be a list of strings, which is somewhat complex to prompt for. 882 (customize-set-variable 'ps-print-color-p t)
807 (customize-variable 'lpr-switches) 883 (setq original-face-background
808 (boundp 'lpr-switches)] 884 (face-background-instance 'default))
809 ("%_Pretty-Print Paper Size" 885 (set-face-background 'default "white")))
810 ["%_Letter" 886 :style toggle
811 (customize-set-variable 'ps-paper-type 'letter) 887 :selected (and (boundp 'ps-print-color-p) ps-print-color-p)
812 :style radio 888 :active (boundp 'ps-print-color-p)])
813 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'letter)) 889 ("%_Internet"
814 :active (boundp 'ps-paper-type)] 890 ("%_Compose Mail With"
815 ["Lette%_r-Small" 891 ["VM mail package"
816 (customize-set-variable 'ps-paper-type 'letter-small) 892 (customize-set-variable 'mail-user-agent 'vm-user-agent)
817 :style radio 893 :style radio
818 :selected (and (boundp 'ps-paper-type) 894 :selected (eq mail-user-agent 'vm-user-agent)
819 (eq ps-paper-type 'letter-small)) 895 :active (get 'vm-user-agent 'composefunc)]
820 :active (boundp 'ps-paper-type)] 896 ["Bare-bones Emacs Mailer"
821 ["Le%_gal" 897 (customize-set-variable 'mail-user-agent 'sendmail-user-agent)
822 (customize-set-variable 'ps-paper-type 'legal) 898 :style radio
823 :style radio 899 :selected (eq mail-user-agent 'sendmail-user-agent)]
824 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'legal)) 900 ["MH"
825 :active (boundp 'ps-paper-type)] 901 (customize-set-variable 'mail-user-agent 'mh-e-user-agent)
826 ["%_Statement" 902 :style radio
827 (customize-set-variable 'ps-paper-type 'statement) 903 :selected (eq mail-user-agent 'mh-e-user-agent)
828 :style radio 904 :active (get 'mh-e-user-agent 'composefunc)]
829 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'statement)) 905 ["GNUS"
830 :active (boundp 'ps-paper-type)] 906 (customize-set-variable 'mail-user-agent 'message-user-agent)
831 ["%_Executive" 907 :style radio
832 (customize-set-variable 'ps-paper-type 'executive) 908 :selected (eq mail-user-agent 'message-user-agent)
833 :style radio 909 :active (get 'message-user-agent 'composefunc)]
834 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'executive))
835 :active (boundp 'ps-paper-type)]
836 ["%_Tabloid"
837 (customize-set-variable 'ps-paper-type 'tabloid)
838 :style radio
839 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'tabloid))
840 :active (boundp 'ps-paper-type)]
841 ["Le%_dger"
842 (customize-set-variable 'ps-paper-type 'ledger)
843 :style radio
844 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'ledger))
845 :active (boundp 'ps-paper-type)]
846 ["A%_3"
847 (customize-set-variable 'ps-paper-type 'a3)
848 :style radio
849 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a3))
850 :active (boundp 'ps-paper-type)]
851 ["%_A4"
852 (customize-set-variable 'ps-paper-type 'a4)
853 :style radio
854 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4))
855 :active (boundp 'ps-paper-type)]
856 ["A4s%_mall"
857 (customize-set-variable 'ps-paper-type 'a4small)
858 :style radio
859 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4small))
860 :active (boundp 'ps-paper-type)]
861 ["B%_4"
862 (customize-set-variable 'ps-paper-type 'b4)
863 :style radio
864 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b4))
865 :active (boundp 'ps-paper-type)]
866 ["%_B5"
867 (customize-set-variable 'ps-paper-type 'b5)
868 :style radio
869 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b5))
870 :active (boundp 'ps-paper-type)]
871 )
872 ["%_Color Printing"
873 (cond (ps-print-color-p
874 (customize-set-variable 'ps-print-color-p nil)
875 ;; I'm wondering whether all this muck is useful.
876 (and (boundp 'original-face-background)
877 original-face-background
878 (set-face-background 'default original-face-background)))
879 (t
880 (customize-set-variable 'ps-print-color-p t)
881 (setq original-face-background
882 (face-background-instance 'default))
883 (set-face-background 'default "white")))
884 :style toggle
885 :selected (and (boundp 'ps-print-color-p) ps-print-color-p)
886 :active (boundp 'ps-print-color-p)])
887 ("%_Internet"
888 ("%_Compose Mail With"
889 ["VM mail package"
890 (customize-set-variable 'mail-user-agent 'vm-user-agent)
891 :style radio
892 :selected (eq mail-user-agent 'vm-user-agent)
893 :active (get 'vm-user-agent 'composefunc)]
894 ["Bare-bones Emacs Mailer"
895 (customize-set-variable 'mail-user-agent 'sendmail-user-agent)
896 :style radio
897 :selected (eq mail-user-agent 'sendmail-user-agent)]
898 ["MH"
899 (customize-set-variable 'mail-user-agent 'mh-e-user-agent)
900 :style radio
901 :selected (eq mail-user-agent 'mh-e-user-agent)
902 :active (get 'mh-e-user-agent 'composefunc)]
903 ["GNUS"
904 (customize-set-variable 'mail-user-agent 'message-user-agent)
905 :style radio
906 :selected (eq mail-user-agent 'message-user-agent)
907 :active (get 'message-user-agent 'composefunc)]
908 )
909 ["Set My %_Email Address..."
910 (customize-set-variable
911 'user-mail-address
912 (read-string "Set email address: " user-mail-address))]
913 ["Set %_Machine Email Name..."
914 (customize-set-variable
915 'mail-host-address
916 (read-string "Set machine email name: " mail-host-address))]
917 ["Set %_SMTP Server..."
918 (progn
919 (require 'smtpmail)
920 (customize-set-variable
921 'smtpmail-smtp-server
922 (read-string "Set SMTP server: " smtpmail-smtp-server)))
923 :active (and (boundp 'send-mail-function)
924 (eq send-mail-function 'smtpmail-send-it))]
925 ["SMTP %_Debug Info"
926 (progn
927 (require 'smtpmail)
928 (customize-set-variable 'smtpmail-debug-info
929 (not smtpmail-debug-info)))
930 :style toggle
931 :selected (and (boundp 'smtpmail-debug-info) smtpmail-debug-info)
932 :active (and (boundp 'send-mail-function)
933 (eq send-mail-function 'smtpmail-send-it))])
934 ("%_Troubleshooting"
935 ["%_Debug on Error [not saved]"
936 (setq debug-on-error (not debug-on-error))
937 :style toggle :selected debug-on-error]
938 ["Debug on %_Quit [not saved]"
939 (setq debug-on-quit (not debug-on-quit))
940 :style toggle :selected debug-on-quit]
941 ["Debug on S%_ignal [not saved]"
942 (setq debug-on-signal (not debug-on-signal))
943 :style toggle :selected debug-on-signal]
944 ["%_Stack Trace on Error [not saved]"
945 (setq stack-trace-on-error (not stack-trace-on-error))
946 :style toggle :selected stack-trace-on-error]
947 ["Stack Trace on Si%_gnal [not saved]"
948 (setq stack-trace-on-signal (not stack-trace-on-signal))
949 :style toggle :selected stack-trace-on-signal]
950 ) 910 )
951 ("Encodin%_g" 911 ["Set My %_Email Address..."
952 ["Automatic %_EOL Detection" 912 (customize-set-variable
953 (customize-set-variable 'eol-detection-enabled-p 913 'user-mail-address
954 (not eol-detection-enabled-p)) 914 (read-string "Set email address: " user-mail-address))]
955 :style toggle 915 ["Set %_Machine Email Name..."
956 :selected eol-detection-enabled-p 916 (customize-set-variable
957 :included (not (memq system-type '(windows-nt cygwin32)))] 917 'mail-host-address
958 ("Set Coding System of %_Buffer File" 918 (read-string "Set machine email name: " mail-host-address))]
959 :filter 919 ["Set %_SMTP Server..."
960 (lambda (menu) 920 (progn
961 (coding-system-menu-filter 921 (require 'smtpmail)
962 (lambda (entry) 922 (customize-set-variable
963 (set-buffer-file-coding-system entry)) 923 'smtpmail-smtp-server
964 (lambda (entry) t) 924 (read-string "Set SMTP server: " smtpmail-smtp-server)))
965 )) 925 :active (and (boundp 'send-mail-function)
966 ) 926 (eq send-mail-function 'smtpmail-send-it))]
967 ;; not implemented yet 927 ["SMTP %_Debug Info"
968 ("Set Coding System of %_Terminal" 928 (progn
969 :filter 929 (require 'smtpmail)
970 (lambda (menu) 930 (customize-set-variable 'smtpmail-debug-info
971 (coding-system-menu-filter 931 (not smtpmail-debug-info)))
972 (lambda (entry) 932 :style toggle
973 (set-terminal-coding-system entry)) 933 :selected (and (boundp 'smtpmail-debug-info) smtpmail-debug-info)
974 (lambda (entry) nil) 934 :active (and (boundp 'send-mail-function)
975 )) 935 (eq send-mail-function 'smtpmail-send-it))])
976 ) 936 ("%_Troubleshooting"
977 ;; not implemented yet 937 ["%_Debug on Error [not saved]"
978 ("Set Coding System of %_Keyboard" 938 (setq debug-on-error (not debug-on-error))
979 :filter 939 :style toggle :selected debug-on-error]
980 (lambda (menu) 940 ["Debug on %_Quit [not saved]"
981 (coding-system-menu-filter 941 (setq debug-on-quit (not debug-on-quit))
982 (lambda (entry) 942 :style toggle :selected debug-on-quit]
983 (set-keyboard-coding-system entry)) 943 ["Debug on S%_ignal [not saved]"
984 (lambda (entry) nil) 944 (setq debug-on-signal (not debug-on-signal))
985 )) 945 :style toggle :selected debug-on-signal]
986 ) 946 ["%_Stack Trace on Error [not saved]"
987 ("Set Coding System of %_Process" 947 (setq stack-trace-on-error (not stack-trace-on-error))
988 :filter 948 :style toggle :selected stack-trace-on-error]
989 (lambda (menu) 949 ["Stack Trace on Si%_gnal [not saved]"
990 (coding-system-menu-filter 950 (setq stack-trace-on-signal (not stack-trace-on-signal))
991 (lambda (entry) 951 :style toggle :selected stack-trace-on-signal]
992 (set-buffer-process-coding-system entry)) 952 )
993 (lambda (entry) (get-buffer-process (current-buffer))) 953 ("Encodin%_g"
994 )) 954 ["Automatic %_EOL Detection"
995 ) 955 (customize-set-variable 'eol-detection-enabled-p
956 (not eol-detection-enabled-p))
957 :style toggle
958 :selected eol-detection-enabled-p
959 :included (not (memq system-type '(windows-nt cygwin32)))]
960 ("Set Coding System of %_Buffer File"
961 :filter
962 ,#'(lambda (menu)
963 (coding-system-menu-filter
964 (lambda (entry)
965 (set-buffer-file-coding-system entry))
966 (lambda (entry) t))))
967 ;; not implemented yet
968 ("Set Coding System of %_Terminal"
969 :filter
970 ,#'(lambda (menu)
971 (coding-system-menu-filter
972 (lambda (entry)
973 (set-terminal-coding-system entry))
974 (lambda (entry) nil)))
996 ) 975 )
997 ,@(when (featurep 'mule) 976 ;; not implemented yet
998 '(("Internationa%_l" 977 ("Set Coding System of %_Keyboard"
999 ("Set %_Language Environment" 978 :filter
1000 :filter 979 ,#'(lambda (menu)
1001 (lambda (menu) 980 (coding-system-menu-filter
1002 (menu-split-long-menu-and-sort 981 (lambda (entry)
1003 (mapcar #'(lambda (entry) 982 (set-keyboard-coding-system entry))
1004 `[ ,(car entry) 983 (lambda (entry) nil))))
1005 (set-language-environment ',(car entry)) 984 ("Set Coding System of %_Process"
1006 :style radio 985 :filter
1007 :selected 986 ,#'(lambda (menu)
1008 ,(equal (car entry) 987 (coding-system-menu-filter
1009 current-language-environment)]) 988 (lambda (entry)
1010 language-info-alist) 989 (set-buffer-process-coding-system entry entry))
1011 ))) 990 (lambda (entry) (get-buffer-process (current-buffer)))))))
1012 ["%_Toggle Input Method" toggle-input-method] 991 ,@(when (featurep 'mule)
1013 ["Select %_Input Method" set-input-method] 992 `(("Internationa%_l"
1014 ))) 993 ("Set %_Language Environment"
994 :filter
995 ,#'(lambda (menu)
996 (menu-split-long-menu-and-sort
997 (mapcar #'(lambda (entry)
998 `[ ,(car entry)
999 (set-language-environment ',(car entry))
1000 :style radio
1001 :selected
1002 ,(equal (car entry)
1003 current-language-environment)])
1004 language-info-alist)
1005 )))
1006 ["%_Toggle Input Method" toggle-input-method]
1007 ["Select %_Input Method" set-input-method]
1008 )))
1009 "-----"
1010 ("%_Display"
1011 ,@(if (featurep 'scrollbar)
1012 '(["%_Scrollbars"
1013 (customize-set-variable 'scrollbars-visible-p
1014 (not scrollbars-visible-p))
1015 :style toggle
1016 :selected scrollbars-visible-p]))
1017 ["%_Wrap Long Lines"
1018 (progn ;; becomes buffer-local
1019 (setq truncate-lines (not truncate-lines))
1020 (customize-set-variable 'truncate-lines truncate-lines))
1021 :style toggle
1022 :selected (not truncate-lines)]
1023 "----"
1024 ["%_3D Modeline"
1025 (customize-set-variable 'modeline-3d-p
1026 (not modeline-3d-p))
1027 :style toggle
1028 :selected modeline-3d-p]
1029 ("Modeline %_Horizontal Scrolling"
1030 ["%_None"
1031 (customize-set-variable 'modeline-scrolling-method nil)
1032 :style radio
1033 :selected (not modeline-scrolling-method)]
1034 ["As %_Text"
1035 (customize-set-variable 'modeline-scrolling-method t)
1036 :style radio
1037 :selected (eq modeline-scrolling-method t)]
1038 ["As %_Scrollbar"
1039 (customize-set-variable 'modeline-scrolling-method 'scrollbar)
1040 :style radio
1041 :selected (eq modeline-scrolling-method 'scrollbar)]
1042 )
1043 ,@(if (featurep 'toolbar)
1044 '("---"
1045 ["%_Toolbars Visible"
1046 (customize-set-variable 'toolbar-visible-p
1047 (not toolbar-visible-p))
1048 :style toggle
1049 :selected toolbar-visible-p]
1050 ["Toolbars Ca%_ptioned"
1051 (customize-set-variable 'toolbar-captioned-p
1052 (not toolbar-captioned-p))
1053 :style toggle
1054 :active toolbar-visible-p
1055 :selected toolbar-captioned-p]
1056 ("Default Toolba%_r Location"
1057 ["%_Top"
1058 (customize-set-variable 'default-toolbar-position 'top)
1059 :style radio
1060 :active toolbar-visible-p
1061 :selected (eq default-toolbar-position 'top)]
1062 ["%_Bottom"
1063 (customize-set-variable 'default-toolbar-position 'bottom)
1064 :style radio
1065 :active toolbar-visible-p
1066 :selected (eq default-toolbar-position 'bottom)]
1067 ["%_Left"
1068 (customize-set-variable 'default-toolbar-position 'left)
1069 :style radio
1070 :active toolbar-visible-p
1071 :selected (eq default-toolbar-position 'left)]
1072 ["%_Right"
1073 (customize-set-variable 'default-toolbar-position 'right)
1074 :style radio
1075 :active toolbar-visible-p
1076 :selected (eq default-toolbar-position 'right)]
1077 )
1078 ))
1079 ,@(if (featurep 'gutter)
1080 '("---"
1081 ["B%_uffers Tab Visible"
1082 (customize-set-variable 'gutter-buffers-tab-visible-p
1083 (not gutter-buffers-tab-visible-p))
1084 :style toggle
1085 :selected gutter-buffers-tab-visible-p]
1086 ("Default %_Gutter Location"
1087 ["%_Top"
1088 (customize-set-variable 'default-gutter-position 'top)
1089 :style radio
1090 :selected (eq default-gutter-position 'top)]
1091 ["%_Bottom"
1092 (customize-set-variable 'default-gutter-position 'bottom)
1093 :style radio
1094 :selected (eq default-gutter-position 'bottom)]
1095 ["%_Left"
1096 (customize-set-variable 'default-gutter-position 'left)
1097 :style radio
1098 :selected (eq default-gutter-position 'left)]
1099 ["%_Right"
1100 (customize-set-variable 'default-gutter-position 'right)
1101 :style radio
1102 :selected (eq default-gutter-position 'right)]
1103 )
1104 ))
1015 "-----" 1105 "-----"
1016 ("%_Display" 1106 ["%_Blinking Cursor"
1017 ,@(if (featurep 'scrollbar) 1107 (customize-set-variable 'blink-cursor-mode (not blink-cursor-mode))
1018 '(["%_Scrollbars" 1108 :style toggle
1019 (customize-set-variable 'scrollbars-visible-p 1109 :selected (and (boundp 'blink-cursor-mode) blink-cursor-mode)
1020 (not scrollbars-visible-p)) 1110 :active (boundp 'blink-cursor-mode)]
1021 :style toggle 1111 ["Bl%_ock Cursor"
1022 :selected scrollbars-visible-p])) 1112 (progn
1023 ["%_Wrap Long Lines" 1113 (customize-set-variable 'bar-cursor nil)
1024 (progn;; becomes buffer-local 1114 (force-cursor-redisplay))
1025 (setq truncate-lines (not truncate-lines)) 1115 :style radio
1026 (customize-set-variable 'truncate-lines truncate-lines)) 1116 :selected (null bar-cursor)]
1027 :style toggle 1117 ["Bar Cursor (%_1 Pixel)"
1028 :selected (not truncate-lines)] 1118 (progn
1029 "----" 1119 (customize-set-variable 'bar-cursor t)
1030 ["%_3D Modeline" 1120 (force-cursor-redisplay))
1031 (customize-set-variable 'modeline-3d-p 1121 :style radio
1032 (not modeline-3d-p)) 1122 :selected (eq bar-cursor t)]
1033 :style toggle 1123 ["Bar Cursor (%_2 Pixels)"
1034 :selected modeline-3d-p] 1124 (progn
1035 ("Modeline %_Horizontal Scrolling" 1125 (customize-set-variable 'bar-cursor 2)
1036 ["%_None" 1126 (force-cursor-redisplay))
1037 (customize-set-variable 'modeline-scrolling-method nil) 1127 :style radio
1038 :style radio 1128 :selected (and bar-cursor (not (eq bar-cursor t)))]
1039 :selected (not modeline-scrolling-method)] 1129 "----"
1040 ["As %_Text" 1130 ("Pa%_ren Highlighting"
1041 (customize-set-variable 'modeline-scrolling-method t)
1042 :style radio
1043 :selected (eq modeline-scrolling-method t)]
1044 ["As %_Scrollbar"
1045 (customize-set-variable 'modeline-scrolling-method 'scrollbar)
1046 :style radio
1047 :selected (eq modeline-scrolling-method 'scrollbar)]
1048 )
1049 ,@(if (featurep 'toolbar)
1050 '("---"
1051 ["%_Toolbars Visible"
1052 (customize-set-variable 'toolbar-visible-p
1053 (not toolbar-visible-p))
1054 :style toggle
1055 :selected toolbar-visible-p]
1056 ["Toolbars Ca%_ptioned"
1057 (customize-set-variable 'toolbar-captioned-p
1058 (not toolbar-captioned-p))
1059 :style toggle
1060 :active toolbar-visible-p
1061 :selected toolbar-captioned-p]
1062 ("Default Toolba%_r Location"
1063 ["%_Top"
1064 (customize-set-variable 'default-toolbar-position 'top)
1065 :style radio
1066 :active toolbar-visible-p
1067 :selected (eq default-toolbar-position 'top)]
1068 ["%_Bottom"
1069 (customize-set-variable 'default-toolbar-position 'bottom)
1070 :style radio
1071 :active toolbar-visible-p
1072 :selected (eq default-toolbar-position 'bottom)]
1073 ["%_Left"
1074 (customize-set-variable 'default-toolbar-position 'left)
1075 :style radio
1076 :active toolbar-visible-p
1077 :selected (eq default-toolbar-position 'left)]
1078 ["%_Right"
1079 (customize-set-variable 'default-toolbar-position 'right)
1080 :style radio
1081 :active toolbar-visible-p
1082 :selected (eq default-toolbar-position 'right)]
1083 )
1084 ))
1085 ,@(if (featurep 'gutter)
1086 '("---"
1087 ["B%_uffers Tab Visible"
1088 (customize-set-variable 'gutter-buffers-tab-visible-p
1089 (not gutter-buffers-tab-visible-p))
1090 :style toggle
1091 :selected gutter-buffers-tab-visible-p]
1092 ("Default %_Gutter Location"
1093 ["%_Top"
1094 (customize-set-variable 'default-gutter-position 'top)
1095 :style radio
1096 :selected (eq default-gutter-position 'top)]
1097 ["%_Bottom"
1098 (customize-set-variable 'default-gutter-position 'bottom)
1099 :style radio
1100 :selected (eq default-gutter-position 'bottom)]
1101 ["%_Left"
1102 (customize-set-variable 'default-gutter-position 'left)
1103 :style radio
1104 :selected (eq default-gutter-position 'left)]
1105 ["%_Right"
1106 (customize-set-variable 'default-gutter-position 'right)
1107 :style radio
1108 :selected (eq default-gutter-position 'right)]
1109 )
1110 ))
1111 "-----"
1112 ["%_Blinking Cursor"
1113 (customize-set-variable 'blink-cursor-mode (not blink-cursor-mode))
1114 :style toggle
1115 :selected (and (boundp 'blink-cursor-mode) blink-cursor-mode)
1116 :active (boundp 'blink-cursor-mode)]
1117 ["Bl%_ock Cursor"
1118 (progn
1119 (customize-set-variable 'bar-cursor nil)
1120 (force-cursor-redisplay))
1121 :style radio
1122 :selected (null bar-cursor)]
1123 ["Bar Cursor (%_1 Pixel)"
1124 (progn
1125 (customize-set-variable 'bar-cursor t)
1126 (force-cursor-redisplay))
1127 :style radio
1128 :selected (eq bar-cursor t)]
1129 ["Bar Cursor (%_2 Pixels)"
1130 (progn
1131 (customize-set-variable 'bar-cursor 2)
1132 (force-cursor-redisplay))
1133 :style radio
1134 :selected (and bar-cursor (not (eq bar-cursor t)))]
1135 "----"
1136 ("Pa%_ren Highlighting"
1137 ["%_None" 1131 ["%_None"
1138 (customize-set-variable 'paren-mode nil) 1132 (customize-set-variable 'paren-mode nil)
1139 :style radio 1133 :style radio
1140 :selected (and (boundp 'paren-mode) (not paren-mode)) 1134 :selected (and (boundp 'paren-mode) (not paren-mode))
1141 :active (boundp 'paren-mode)] 1135 :active (boundp 'paren-mode)]
1158 ;; (customize-set-variable 'paren-mode 'nested) 1152 ;; (customize-set-variable 'paren-mode 'nested)
1159 ;; :style radio 1153 ;; :style radio
1160 ;; :selected (and (boundp 'paren-mode) (eq paren-mode 'nested)) 1154 ;; :selected (and (boundp 'paren-mode) (eq paren-mode 'nested))
1161 ;; :active (boundp 'paren-mode)] 1155 ;; :active (boundp 'paren-mode)]
1162 ) 1156 )
1163 "------" 1157 "------"
1164 ["%_Line Numbers" 1158 ["%_Line Numbers"
1159 (progn
1160 (customize-set-variable 'line-number-mode (not line-number-mode))
1161 (redraw-modeline))
1162 :style toggle :selected line-number-mode]
1163 ["%_Column Numbers"
1164 (progn
1165 (customize-set-variable 'column-number-mode
1166 (not column-number-mode))
1167 (redraw-modeline))
1168 :style toggle :selected column-number-mode]
1169
1170 ("\"Other %_Window\" Location"
1171 ["%_Always in Same Frame"
1172 (customize-set-variable
1173 'get-frame-for-buffer-default-instance-limit nil)
1174 :style radio
1175 :selected (null get-frame-for-buffer-default-instance-limit)]
1176 ["Other Frame (%_2 Frames Max)"
1177 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
1178 2)
1179 :style radio
1180 :selected (eq 2 get-frame-for-buffer-default-instance-limit)]
1181 ["Other Frame (%_3 Frames Max)"
1182 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
1183 3)
1184 :style radio
1185 :selected (eq 3 get-frame-for-buffer-default-instance-limit)]
1186 ["Other Frame (%_4 Frames Max)"
1187 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
1188 4)
1189 :style radio
1190 :selected (eq 4 get-frame-for-buffer-default-instance-limit)]
1191 ["Other Frame (%_5 Frames Max)"
1192 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
1193 5)
1194 :style radio
1195 :selected (eq 5 get-frame-for-buffer-default-instance-limit)]
1196 ["Always Create %_New Frame"
1197 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
1198 0)
1199 :style radio
1200 :selected (eq 0 get-frame-for-buffer-default-instance-limit)]
1201 "-----"
1202 ["%_Temp Buffers Always in Same Frame"
1203 (customize-set-variable 'temp-buffer-show-function
1204 'show-temp-buffer-in-current-frame)
1205 :style radio
1206 :selected (eq temp-buffer-show-function
1207 'show-temp-buffer-in-current-frame)]
1208 ["Temp Buffers %_Like Other Buffers"
1209 (customize-set-variable 'temp-buffer-show-function nil)
1210 :style radio
1211 :selected (null temp-buffer-show-function)]
1212 "-----"
1213 ["%_Make Current Frame Gnuserv Target"
1214 (customize-set-variable 'gnuserv-frame (if (eq gnuserv-frame t) nil
1215 t))
1216 :style toggle
1217 :selected (and (boundp 'gnuserv-frame) (eq gnuserv-frame t))
1218 :active (boundp 'gnuserv-frame)]
1219 )
1220 )
1221 ("%_Menubars"
1222 ["%_Frame-Local Font Menu"
1223 (customize-set-variable 'font-menu-this-frame-only-p
1224 (not font-menu-this-frame-only-p))
1225 :style toggle
1226 :selected (and (boundp 'font-menu-this-frame-only-p)
1227 font-menu-this-frame-only-p)]
1228 ["%_Alt/Meta Selects Menu Items"
1229 (if (eq menu-accelerator-enabled 'menu-force)
1230 (customize-set-variable 'menu-accelerator-enabled nil)
1231 (customize-set-variable 'menu-accelerator-enabled 'menu-force))
1232 :style toggle
1233 :selected (eq menu-accelerator-enabled 'menu-force)]
1234 "----"
1235 ["Buffers Menu %_Length..."
1236 (customize-set-variable
1237 'buffers-menu-max-size
1238 ;; would it be better to open a customization buffer ?
1239 (let ((val
1240 (read-number
1241 "Enter number of buffers to display (or 0 for unlimited): ")))
1242 (if (eq val 0) nil val)))]
1243 ["%_Multi-Operation Buffers Sub-Menus"
1244 (customize-set-variable 'complex-buffers-menu-p
1245 (not complex-buffers-menu-p))
1246 :style toggle
1247 :selected complex-buffers-menu-p]
1248 ["S%_ubmenus for Buffer Groups"
1249 (customize-set-variable 'buffers-menu-submenus-for-groups-p
1250 (not buffers-menu-submenus-for-groups-p))
1251 :style toggle
1252 :selected buffers-menu-submenus-for-groups-p]
1253 ["%_Verbose Buffer Menu Entries"
1254 (if (eq buffers-menu-format-buffer-line-function
1255 'slow-format-buffers-menu-line)
1256 (customize-set-variable 'buffers-menu-format-buffer-line-function
1257 'format-buffers-menu-line)
1258 (customize-set-variable 'buffers-menu-format-buffer-line-function
1259 'slow-format-buffers-menu-line))
1260 :style toggle
1261 :selected (eq buffers-menu-format-buffer-line-function
1262 'slow-format-buffers-menu-line)]
1263 ("Buffers Menu %_Sorting"
1264 ["%_Most Recently Used"
1165 (progn 1265 (progn
1166 (customize-set-variable 'line-number-mode (not line-number-mode)) 1266 (customize-set-variable 'buffers-menu-sort-function nil)
1167 (redraw-modeline)) 1267 (customize-set-variable 'buffers-menu-grouping-function nil))
1168 :style toggle :selected line-number-mode] 1268 :style radio
1169 ["%_Column Numbers" 1269 :selected (null buffers-menu-sort-function)]
1270 ["%_Alphabetically"
1170 (progn 1271 (progn
1171 (customize-set-variable 'column-number-mode 1272 (customize-set-variable 'buffers-menu-sort-function
1172 (not column-number-mode)) 1273 'sort-buffers-menu-alphabetically)
1173 (redraw-modeline)) 1274 (customize-set-variable 'buffers-menu-grouping-function nil))
1174 :style toggle :selected column-number-mode] 1275 :style radio
1175 1276 :selected (eq 'sort-buffers-menu-alphabetically
1176 ("\"Other %_Window\" Location" 1277 buffers-menu-sort-function)]
1177 ["%_Always in Same Frame" 1278 ["%_By Major Mode, Then Alphabetically"
1178 (customize-set-variable
1179 'get-frame-for-buffer-default-instance-limit nil)
1180 :style radio
1181 :selected (null get-frame-for-buffer-default-instance-limit)]
1182 ["Other Frame (%_2 Frames Max)"
1183 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
1184 2)
1185 :style radio
1186 :selected (eq 2 get-frame-for-buffer-default-instance-limit)]
1187 ["Other Frame (%_3 Frames Max)"
1188 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
1189 3)
1190 :style radio
1191 :selected (eq 3 get-frame-for-buffer-default-instance-limit)]
1192 ["Other Frame (%_4 Frames Max)"
1193 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
1194 4)
1195 :style radio
1196 :selected (eq 4 get-frame-for-buffer-default-instance-limit)]
1197 ["Other Frame (%_5 Frames Max)"
1198 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
1199 5)
1200 :style radio
1201 :selected (eq 5 get-frame-for-buffer-default-instance-limit)]
1202 ["Always Create %_New Frame"
1203 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
1204 0)
1205 :style radio
1206 :selected (eq 0 get-frame-for-buffer-default-instance-limit)]
1207 "-----"
1208 ["%_Temp Buffers Always in Same Frame"
1209 (customize-set-variable 'temp-buffer-show-function
1210 'show-temp-buffer-in-current-frame)
1211 :style radio
1212 :selected (eq temp-buffer-show-function
1213 'show-temp-buffer-in-current-frame)]
1214 ["Temp Buffers %_Like Other Buffers"
1215 (customize-set-variable 'temp-buffer-show-function nil)
1216 :style radio
1217 :selected (null temp-buffer-show-function)]
1218 "-----"
1219 ["%_Make Current Frame Gnuserv Target"
1220 (customize-set-variable 'gnuserv-frame (if (eq gnuserv-frame t) nil
1221 t))
1222 :style toggle
1223 :selected (and (boundp 'gnuserv-frame) (eq gnuserv-frame t))
1224 :active (boundp 'gnuserv-frame)]
1225 )
1226 )
1227 ("%_Menubars"
1228 ["%_Frame-Local Font Menu"
1229 (customize-set-variable 'font-menu-this-frame-only-p
1230 (not font-menu-this-frame-only-p))
1231 :style toggle
1232 :selected (and (boundp 'font-menu-this-frame-only-p)
1233 font-menu-this-frame-only-p)]
1234 ["%_Alt/Meta Selects Menu Items"
1235 (if (eq menu-accelerator-enabled 'menu-force)
1236 (customize-set-variable 'menu-accelerator-enabled nil)
1237 (customize-set-variable 'menu-accelerator-enabled 'menu-force))
1238 :style toggle
1239 :selected (eq menu-accelerator-enabled 'menu-force)]
1240 "----"
1241 ["Buffers Menu %_Length..."
1242 (customize-set-variable
1243 'buffers-menu-max-size
1244 ;; would it be better to open a customization buffer ?
1245 (let ((val
1246 (read-number
1247 "Enter number of buffers to display (or 0 for unlimited): ")))
1248 (if (eq val 0) nil val)))]
1249 ["%_Multi-Operation Buffers Sub-Menus"
1250 (customize-set-variable 'complex-buffers-menu-p
1251 (not complex-buffers-menu-p))
1252 :style toggle
1253 :selected complex-buffers-menu-p]
1254 ["S%_ubmenus for Buffer Groups"
1255 (customize-set-variable 'buffers-menu-submenus-for-groups-p
1256 (not buffers-menu-submenus-for-groups-p))
1257 :style toggle
1258 :selected buffers-menu-submenus-for-groups-p]
1259 ["%_Verbose Buffer Menu Entries"
1260 (if (eq buffers-menu-format-buffer-line-function
1261 'slow-format-buffers-menu-line)
1262 (customize-set-variable 'buffers-menu-format-buffer-line-function
1263 'format-buffers-menu-line)
1264 (customize-set-variable 'buffers-menu-format-buffer-line-function
1265 'slow-format-buffers-menu-line))
1266 :style toggle
1267 :selected (eq buffers-menu-format-buffer-line-function
1268 'slow-format-buffers-menu-line)]
1269 ("Buffers Menu %_Sorting"
1270 ["%_Most Recently Used"
1271 (progn
1272 (customize-set-variable 'buffers-menu-sort-function nil)
1273 (customize-set-variable 'buffers-menu-grouping-function nil))
1274 :style radio
1275 :selected (null buffers-menu-sort-function)]
1276 ["%_Alphabetically"
1277 (progn
1278 (customize-set-variable 'buffers-menu-sort-function
1279 'sort-buffers-menu-alphabetically)
1280 (customize-set-variable 'buffers-menu-grouping-function nil))
1281 :style radio
1282 :selected (eq 'sort-buffers-menu-alphabetically
1283 buffers-menu-sort-function)]
1284 ["%_By Major Mode, Then Alphabetically"
1285 (progn
1286 (customize-set-variable
1287 'buffers-menu-sort-function
1288 'sort-buffers-menu-by-mode-then-alphabetically)
1289 (customize-set-variable
1290 'buffers-menu-grouping-function
1291 'group-buffers-menu-by-mode-then-alphabetically))
1292 :style radio
1293 :selected (eq 'sort-buffers-menu-by-mode-then-alphabetically
1294 buffers-menu-sort-function)])
1295 "---"
1296 ["%_Ignore Scaled Fonts"
1297 (customize-set-variable 'font-menu-ignore-scaled-fonts
1298 (not font-menu-ignore-scaled-fonts))
1299 :style toggle
1300 :selected (and (boundp 'font-menu-ignore-scaled-fonts)
1301 font-menu-ignore-scaled-fonts)]
1302 )
1303 ("S%_yntax Highlighting"
1304 ["%_In This Buffer"
1305 (progn;; becomes buffer local
1306 (font-lock-mode)
1307 (customize-set-variable 'font-lock-mode font-lock-mode))
1308 :style toggle
1309 :selected (and (boundp 'font-lock-mode) font-lock-mode)
1310 :active (boundp 'font-lock-mode)]
1311 ["%_Automatic"
1312 (customize-set-variable 'font-lock-auto-fontify
1313 (not font-lock-auto-fontify))
1314 :style toggle
1315 :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify)
1316 :active (fboundp 'font-lock-mode)]
1317 "-----"
1318 ["Force %_Rehighlight in this Buffer"
1319 (customize-set-variable 'font-lock-auto-fontify
1320 (not font-lock-auto-fontify))
1321 :style toggle
1322 :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify)
1323 :active (fboundp 'font-lock-mode)]
1324 "-----"
1325 ["%_Fonts"
1326 (progn 1279 (progn
1327 (require 'font-lock) 1280 (customize-set-variable
1328 (font-lock-use-default-fonts) 1281 'buffers-menu-sort-function
1329 (customize-set-variable 'font-lock-use-fonts t) 1282 'sort-buffers-menu-by-mode-then-alphabetically)
1330 (customize-set-variable 'font-lock-use-colors nil) 1283 (customize-set-variable
1331 (font-lock-mode 1)) 1284 'buffers-menu-grouping-function
1332 :style radio 1285 'group-buffers-menu-by-mode-then-alphabetically))
1333 :selected (and (boundp 'font-lock-use-fonts) font-lock-use-fonts) 1286 :style radio
1334 :active (fboundp 'font-lock-mode)] 1287 :selected (eq 'sort-buffers-menu-by-mode-then-alphabetically
1335 ["%_Colors" 1288 buffers-menu-sort-function)])
1336 (progn 1289 "---"
1337 (require 'font-lock) 1290 ["%_Ignore Scaled Fonts"
1338 (font-lock-use-default-colors) 1291 (customize-set-variable 'font-menu-ignore-scaled-fonts
1339 (customize-set-variable 'font-lock-use-colors t) 1292 (not font-menu-ignore-scaled-fonts))
1340 (customize-set-variable 'font-lock-use-fonts nil) 1293 :style toggle
1341 (font-lock-mode 1)) 1294 :selected (and (boundp 'font-menu-ignore-scaled-fonts)
1342 :style radio 1295 font-menu-ignore-scaled-fonts)]
1343 :selected (and (boundp 'font-lock-use-colors) font-lock-use-colors) 1296 )
1344 :active (boundp 'font-lock-mode)] 1297 ("S%_yntax Highlighting"
1345 "-----" 1298 ["%_In This Buffer"
1346 ["%_1 Least" 1299 (progn ;; becomes buffer local
1347 (progn 1300 (font-lock-mode)
1348 (require 'font-lock) 1301 (customize-set-variable 'font-lock-mode font-lock-mode))
1349 (if (or (and (not (integerp font-lock-maximum-decoration)) 1302 :style toggle
1350 (not (eq t font-lock-maximum-decoration))) 1303 :selected (and (boundp 'font-lock-mode) font-lock-mode)
1351 (and (integerp font-lock-maximum-decoration) 1304 :active (boundp 'font-lock-mode)]
1352 (<= font-lock-maximum-decoration 0))) 1305 ["%_Automatic"
1353 nil 1306 (customize-set-variable 'font-lock-auto-fontify
1354 (customize-set-variable 'font-lock-maximum-decoration nil) 1307 (not font-lock-auto-fontify))
1355 (font-lock-recompute-variables))) 1308 :style toggle
1356 :style radio 1309 :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify)
1357 :active (fboundp 'font-lock-mode) 1310 :active (fboundp 'font-lock-mode)]
1358 :selected (and (boundp 'font-lock-maximum-decoration)
1359 (or (and (not (integerp font-lock-maximum-decoration))
1360 (not (eq t font-lock-maximum-decoration)))
1361 (and (integerp font-lock-maximum-decoration)
1362 (<= font-lock-maximum-decoration 0))))]
1363 ["%_2 More"
1364 (progn
1365 (require 'font-lock)
1366 (if (and (integerp font-lock-maximum-decoration)
1367 (= 1 font-lock-maximum-decoration))
1368 nil
1369 (customize-set-variable 'font-lock-maximum-decoration 1)
1370 (font-lock-recompute-variables)))
1371 :style radio
1372 :active (fboundp 'font-lock-mode)
1373 :selected (and (boundp 'font-lock-maximum-decoration)
1374 (integerp font-lock-maximum-decoration)
1375 (= 1 font-lock-maximum-decoration))]
1376 ["%_3 Even More"
1377 (progn
1378 (require 'font-lock)
1379 (if (and (integerp font-lock-maximum-decoration)
1380 (= 2 font-lock-maximum-decoration))
1381 nil
1382 (customize-set-variable 'font-lock-maximum-decoration 2)
1383 (font-lock-recompute-variables)))
1384 :style radio
1385 :active (fboundp 'font-lock-mode)
1386 :selected (and (boundp 'font-lock-maximum-decoration)
1387 (integerp font-lock-maximum-decoration)
1388 (= 2 font-lock-maximum-decoration))]
1389 ["%_4 Most"
1390 (progn
1391 (require 'font-lock)
1392 (if (or (eq font-lock-maximum-decoration t)
1393 (and (integerp font-lock-maximum-decoration)
1394 (>= font-lock-maximum-decoration 3)))
1395 nil
1396 (customize-set-variable 'font-lock-maximum-decoration t)
1397 (font-lock-recompute-variables)))
1398 :style radio
1399 :active (fboundp 'font-lock-mode)
1400 :selected (and (boundp 'font-lock-maximum-decoration)
1401 (or (eq font-lock-maximum-decoration t)
1402 (and (integerp font-lock-maximum-decoration)
1403 (>= font-lock-maximum-decoration 3))))]
1404 "-----"
1405 ["Lazy %_Lock"
1406 (progn;; becomes buffer local
1407 (lazy-lock-mode)
1408 (customize-set-variable 'lazy-lock-mode lazy-lock-mode)
1409 ;; this shouldn't be necessary so there has to
1410 ;; be a redisplay bug lurking somewhere (or
1411 ;; possibly another event handler bug)
1412 (redraw-modeline))
1413 :active (and (boundp 'font-lock-mode) (boundp 'lazy-lock-mode)
1414 font-lock-mode)
1415 :style toggle
1416 :selected (and (boundp 'lazy-lock-mode) lazy-lock-mode)]
1417 ["Lazy %_Shot"
1418 (progn;; becomes buffer local
1419 (lazy-shot-mode)
1420 (customize-set-variable 'lazy-shot-mode lazy-shot-mode)
1421 ;; this shouldn't be necessary so there has to
1422 ;; be a redisplay bug lurking somewhere (or
1423 ;; possibly another event handler bug)
1424 (redraw-modeline))
1425 :active (and (boundp 'font-lock-mode) (boundp 'lazy-shot-mode)
1426 font-lock-mode)
1427 :style toggle
1428 :selected (and (boundp 'lazy-shot-mode) lazy-shot-mode)]
1429 ["Cac%_hing"
1430 (progn;; becomes buffer local
1431 (fast-lock-mode)
1432 (customize-set-variable 'fast-lock-mode fast-lock-mode)
1433 ;; this shouldn't be necessary so there has to
1434 ;; be a redisplay bug lurking somewhere (or
1435 ;; possibly another event handler bug)
1436 (redraw-modeline))
1437 :active (and (boundp 'font-lock-mode) (boundp 'fast-lock-mode)
1438 font-lock-mode)
1439 :style toggle
1440 :selected (and (boundp 'fast-lock-mode) fast-lock-mode)]
1441 )
1442 ("%_Font" :filter font-menu-family-constructor)
1443 ("Font Si%_ze" :filter font-menu-size-constructor)
1444 ;; ("Font Weig%_ht" :filter font-menu-weight-constructor)
1445 ["Edit Fa%_ces..." (customize-face nil)]
1446 "-----" 1311 "-----"
1447 ["Edit I%_nit File" 1312 ["Force %_Rehighlight in this Buffer"
1448 ;; #### there should be something that holds the name that the init 1313 (customize-set-variable 'font-lock-auto-fontify
1449 ;; file should be created as, when it's not present. 1314 (not font-lock-auto-fontify))
1450 (let ((el-file (or user-init-file "~/.xemacs/init.el"))) 1315 :style toggle
1451 (if (string-match "\\.elc$" el-file) 1316 :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify)
1452 (setq el-file 1317 :active (fboundp 'font-lock-mode)]
1453 (substring user-init-file 0 (1- (length el-file))))) 1318 "-----"
1454 (find-file el-file) 1319 ["%_Fonts"
1455 (or (eq major-mode 'emacs-lisp-mode) 1320 (progn
1456 (emacs-lisp-mode)))] 1321 (require 'font-lock)
1457 ["%_Save Options to Custom File" customize-save-customized] 1322 (font-lock-use-default-fonts)
1323 (customize-set-variable 'font-lock-use-fonts t)
1324 (customize-set-variable 'font-lock-use-colors nil)
1325 (font-lock-mode 1))
1326 :style radio
1327 :selected (and (boundp 'font-lock-use-fonts) font-lock-use-fonts)
1328 :active (fboundp 'font-lock-mode)]
1329 ["%_Colors"
1330 (progn
1331 (require 'font-lock)
1332 (font-lock-use-default-colors)
1333 (customize-set-variable 'font-lock-use-colors t)
1334 (customize-set-variable 'font-lock-use-fonts nil)
1335 (font-lock-mode 1))
1336 :style radio
1337 :selected (and (boundp 'font-lock-use-colors) font-lock-use-colors)
1338 :active (boundp 'font-lock-mode)]
1339 "-----"
1340 ["%_1 Least"
1341 (progn
1342 (require 'font-lock)
1343 (if (or (and (not (integerp font-lock-maximum-decoration))
1344 (not (eq t font-lock-maximum-decoration)))
1345 (and (integerp font-lock-maximum-decoration)
1346 (<= font-lock-maximum-decoration 0)))
1347 nil
1348 (customize-set-variable 'font-lock-maximum-decoration nil)
1349 (font-lock-recompute-variables)))
1350 :style radio
1351 :active (fboundp 'font-lock-mode)
1352 :selected (and (boundp 'font-lock-maximum-decoration)
1353 (or (and (not (integerp font-lock-maximum-decoration))
1354 (not (eq t font-lock-maximum-decoration)))
1355 (and (integerp font-lock-maximum-decoration)
1356 (<= font-lock-maximum-decoration 0))))]
1357 ["%_2 More"
1358 (progn
1359 (require 'font-lock)
1360 (if (and (integerp font-lock-maximum-decoration)
1361 (= 1 font-lock-maximum-decoration))
1362 nil
1363 (customize-set-variable 'font-lock-maximum-decoration 1)
1364 (font-lock-recompute-variables)))
1365 :style radio
1366 :active (fboundp 'font-lock-mode)
1367 :selected (and (boundp 'font-lock-maximum-decoration)
1368 (integerp font-lock-maximum-decoration)
1369 (= 1 font-lock-maximum-decoration))]
1370 ["%_3 Even More"
1371 (progn
1372 (require 'font-lock)
1373 (if (and (integerp font-lock-maximum-decoration)
1374 (= 2 font-lock-maximum-decoration))
1375 nil
1376 (customize-set-variable 'font-lock-maximum-decoration 2)
1377 (font-lock-recompute-variables)))
1378 :style radio
1379 :active (fboundp 'font-lock-mode)
1380 :selected (and (boundp 'font-lock-maximum-decoration)
1381 (integerp font-lock-maximum-decoration)
1382 (= 2 font-lock-maximum-decoration))]
1383 ["%_4 Most"
1384 (progn
1385 (require 'font-lock)
1386 (if (or (eq font-lock-maximum-decoration t)
1387 (and (integerp font-lock-maximum-decoration)
1388 (>= font-lock-maximum-decoration 3)))
1389 nil
1390 (customize-set-variable 'font-lock-maximum-decoration t)
1391 (font-lock-recompute-variables)))
1392 :style radio
1393 :active (fboundp 'font-lock-mode)
1394 :selected (and (boundp 'font-lock-maximum-decoration)
1395 (or (eq font-lock-maximum-decoration t)
1396 (and (integerp font-lock-maximum-decoration)
1397 (>= font-lock-maximum-decoration 3))))]
1398 "-----"
1399 ["Lazy %_Lock"
1400 (progn ;; becomes buffer local
1401 (lazy-lock-mode)
1402 (customize-set-variable 'lazy-lock-mode lazy-lock-mode)
1403 ;; this shouldn't be necessary so there has to
1404 ;; be a redisplay bug lurking somewhere (or
1405 ;; possibly another event handler bug)
1406 (redraw-modeline))
1407 :active (and (boundp 'font-lock-mode) (boundp 'lazy-lock-mode)
1408 font-lock-mode)
1409 :style toggle
1410 :selected (and (boundp 'lazy-lock-mode) lazy-lock-mode)]
1411 ["Lazy %_Shot"
1412 (progn ;; becomes buffer local
1413 (lazy-shot-mode)
1414 (customize-set-variable 'lazy-shot-mode lazy-shot-mode)
1415 ;; this shouldn't be necessary so there has to
1416 ;; be a redisplay bug lurking somewhere (or
1417 ;; possibly another event handler bug)
1418 (redraw-modeline))
1419 :active (and (boundp 'font-lock-mode) (boundp 'lazy-shot-mode)
1420 font-lock-mode)
1421 :style toggle
1422 :selected (and (boundp 'lazy-shot-mode) lazy-shot-mode)]
1423 ["Cac%_hing"
1424 (progn ;; becomes buffer local
1425 (fast-lock-mode)
1426 (customize-set-variable 'fast-lock-mode fast-lock-mode)
1427 ;; this shouldn't be necessary so there has to
1428 ;; be a redisplay bug lurking somewhere (or
1429 ;; possibly another event handler bug)
1430 (redraw-modeline))
1431 :active (and (boundp 'font-lock-mode) (boundp 'fast-lock-mode)
1432 font-lock-mode)
1433 :style toggle
1434 :selected (and (boundp 'fast-lock-mode) fast-lock-mode)]
1458 ) 1435 )
1436 ("%_Font" :filter font-menu-family-constructor)
1437 ("Font Si%_ze" :filter font-menu-size-constructor)
1438 ;; ("Font Weig%_ht" :filter font-menu-weight-constructor)
1439 ["Edit Fa%_ces..." (customize-face nil)]
1440 "-----"
1441 ["Edit I%_nit File"
1442 ;; #### there should be something that holds the name that the init
1443 ;; file should be created as, when it's not present.
1444 (let ((el-file (or user-init-file "~/.xemacs/init.el")))
1445 (if (string-match "\\.elc$" el-file)
1446 (setq el-file
1447 (substring user-init-file 0 (1- (length el-file)))))
1448 (find-file el-file)
1449 (or (eq major-mode 'emacs-lisp-mode)
1450 (emacs-lisp-mode)))]
1451 ["%_Save Options to Custom File" customize-save-customized]
1452 )
1459 1453
1460 ("%_Buffers" 1454 ("%_Buffers"
1461 :filter buffers-menu-filter 1455 :filter buffers-menu-filter
1462 ["Go To %_Previous Buffer" switch-to-other-buffer] 1456 ["Go To %_Previous Buffer" switch-to-other-buffer]
1463 ["Go To %_Buffer..." switch-to-buffer] 1457 ["Go To %_Buffer..." switch-to-buffer]
1464 "----" 1458 "----"
1465 ["%_List All Buffers" list-all-buffers] 1459 ["%_List All Buffers" list-all-buffers]
1466 ["%_Delete Buffer" kill-this-buffer 1460 ["%_Delete Buffer" kill-this-buffer
1467 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] 1461 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
1468 "----" 1462 "----"
1463 )
1464
1465 nil ; the partition: menus after this are flushright
1466
1467 ("%_Help"
1468 ["%_About XEmacs..." about-xemacs]
1469 ["%_Home Page (www.xemacs.org)" xemacs-www-page
1470 :active (fboundp 'browse-url)]
1471 ["What's %_New in XEmacs" view-emacs-news]
1472 ["B%_eta Info" describe-beta
1473 :included (string-match "beta" emacs-version)]
1474 "-----"
1475 ("%_Info (Online Docs)"
1476 ["%_Info Contents" (Info-goto-node "(dir)")]
1477 "-----"
1478 ["XEmacs %_User's Manual" (Info-goto-node "(XEmacs)")]
1479 ["XEmacs %_Lisp Reference Manual" (Info-goto-node "(Lispref)")]
1480 ["All About %_Packages" (Info-goto-node "(xemacs)Packages")]
1481 ["%_Getting Started with XEmacs" (Info-goto-node "(New-Users-Guide)")]
1482 ["%_XEmacs Internals Manual" (Info-goto-node "(Internals)")]
1483 ["%_How to Use Info" (Info-goto-node "(Info)")]
1484 "-----"
1485 ["Lookup %_Key Sequence in User's Manual..."
1486 Info-goto-emacs-key-command-node]
1487 ["Lookup %_Command in User's Manual..." Info-goto-emacs-command-node]
1488 ["Lookup %_Function in Lisp Reference..." Info-elisp-ref]
1489 "-----"
1490 ["Find %_Topic in User's Manual/Lispref..."
1491 Info-search-index-in-xemacs-and-lispref]
1492 ["%_Search Text in User's Manual..." Info-search-text-in-xemacs]
1493 ["S%_earch Text in Lisp Reference..."
1494 Info-search-text-in-lispref]
1469 ) 1495 )
1470 1496 ("XEmacs %_FAQ"
1471 nil ; the partition: menus after this are flushright 1497 ["%_FAQ (local)" xemacs-local-faq]
1472 1498 ["FAQ via %_WWW" xemacs-www-faq
1473 ("%_Help" 1499 :active (fboundp 'browse-url)])
1474 ["%_About XEmacs..." about-xemacs] 1500 ("%_Tutorials"
1475 ["%_Home Page (www.xemacs.org)" xemacs-www-page 1501 :filter tutorials-menu-filter)
1476 :active (fboundp 'browse-url)] 1502 ("%_Samples"
1477 ["What's %_New in XEmacs" view-emacs-news] 1503 ["View Sample %_init.el" view-sample-init-el
1478 ["B%_eta Info" describe-beta 1504 :active (locate-data-file "sample.init.el")]
1479 :included (string-match "beta" emacs-version)] 1505 ["View Sample .%_gtkrc"
1506 (Help-find-file (locate-data-file "sample.gtkrc"))
1507 :included (featurep 'gtk)
1508 :active (locate-data-file "sample.gtkrc")]
1509 ["View Sample .%_Xresources"
1510 (Help-find-file (locate-data-file "sample.Xresources"))
1511 :included (featurep 'x)
1512 :active (locate-data-file "sample.Xresources")]
1513 ["View Sample %_enriched.doc"
1514 (Help-find-file (locate-data-file "enriched.doc"))
1515 :active (locate-data-file "enriched.doc")])
1516 ("%_Commands, Variables, Keys"
1517 ["Describe %_Mode" describe-mode]
1518 ["%_Apropos..." hyper-apropos]
1519 ["%_Command-Only Apropos..." command-hyper-apropos]
1520 ["Apropos %_Docs..." apropos-documentation]
1480 "-----" 1521 "-----"
1481 ("%_Info (Online Docs)" 1522 ["Describe %_Key..." describe-key]
1482 ["%_Info Contents" (Info-goto-node "(dir)")] 1523 ["Show %_Bindings" describe-bindings]
1483 "-----" 1524 ["Show M%_ouse Bindings" describe-pointer]
1484 ["XEmacs %_User's Manual" (Info-goto-node "(XEmacs)")]
1485 ["XEmacs %_Lisp Reference Manual" (Info-goto-node "(Lispref)")]
1486 ["All About %_Packages" (Info-goto-node "(xemacs)Packages")]
1487 ["%_Getting Started with XEmacs" (Info-goto-node "(New-Users-Guide)")]
1488 ["%_XEmacs Internals Manual" (Info-goto-node "(Internals)")]
1489 ["%_How to Use Info" (Info-goto-node "(Info)")]
1490 "-----"
1491 ["Lookup %_Key Sequence in User's Manual..."
1492 Info-goto-emacs-key-command-node]
1493 ["Lookup %_Command in User's Manual..." Info-goto-emacs-command-node]
1494 ["Lookup %_Function in Lisp Reference..." Info-elisp-ref]
1495 "-----"
1496 ["Find %_Topic in User's Manual/Lispref..."
1497 Info-search-index-in-xemacs-and-lispref]
1498 ["%_Search Text in User's Manual..." Info-search-text-in-xemacs]
1499 ["S%_earch Text in Lisp Reference..."
1500 Info-search-text-in-lispref]
1501 )
1502 ("XEmacs %_FAQ"
1503 ["%_FAQ (local)" xemacs-local-faq]
1504 ["FAQ via %_WWW" xemacs-www-faq
1505 :active (fboundp 'browse-url)])
1506 ("%_Tutorials"
1507 :filter tutorials-menu-filter)
1508 ("%_Samples"
1509 ["View Sample %_init.el" view-sample-init-el
1510 :active (locate-data-file "sample.init.el")]
1511 ["View Sample .%_gtkrc"
1512 (Help-find-file (locate-data-file "sample.gtkrc"))
1513 :included (featurep 'gtk)
1514 :active (locate-data-file "sample.gtkrc")]
1515 ["View Sample .%_Xresources"
1516 (Help-find-file (locate-data-file "sample.Xresources"))
1517 :included (featurep 'x)
1518 :active (locate-data-file "sample.Xresources")]
1519 ["View Sample %_enriched.doc"
1520 (Help-find-file (locate-data-file "enriched.doc"))
1521 :active (locate-data-file "enriched.doc")])
1522 ("%_Commands, Variables, Keys"
1523 ["Describe %_Mode" describe-mode]
1524 ["%_Apropos..." hyper-apropos]
1525 ["%_Command-Only Apropos..." command-hyper-apropos]
1526 ["Apropos %_Docs..." apropos-documentation]
1527 "-----"
1528 ["Describe %_Key..." describe-key]
1529 ["Show %_Bindings" describe-bindings]
1530 ["Show M%_ouse Bindings" describe-pointer]
1531 "-----"
1532 ["Describe %_Function..." describe-function]
1533 ["Describe %_Variable..." describe-variable]
1534 ["%_Locate Command in Keymap..." where-is])
1535 ,@(when (featurep 'mule)
1536 '(("Internationa%_l"
1537 ("Describe %_Language Support"
1538 :filter
1539 (lambda (menu)
1540 (menu-split-long-menu-and-sort
1541 (mapcar #'(lambda (entry)
1542 `[ ,(car entry)
1543 (describe-language-environment
1544 ',(car entry))
1545 :style radio
1546 :selected
1547 ,(equal (car entry)
1548 current-language-environment)])
1549 language-info-alist)
1550 )))
1551 ["Describe %_Input Method" describe-input-method]
1552 ["Describe Current %_Coding Systems"
1553 describe-current-coding-system]
1554 ["Show Character %_Table" view-charset-by-menu]
1555 ;; not implemented yet
1556 ["Show %_Diagnosis for MULE" mule-diag :active nil]
1557 ["Show \"%_hello\" in Many Languages" view-hello-file]
1558 )))
1559 ("%_Other"
1560 ["%_Current Installation Info" describe-installation
1561 :active (boundp 'Installation-string)]
1562 ["%_Known Problems" view-xemacs-problems ]
1563 ["%_Obtaining the Latest Version" describe-distribution]
1564 ["%_No Warranty" describe-no-warranty]
1565 ["XEmacs %_License" describe-copying]
1566 ["Find %_Packages" finder-by-keyword]
1567 ["View %_Splash Screen" xemacs-splash-buffer]
1568 ["%_Unix Manual..." manual-entry])
1569 "-----" 1525 "-----"
1570 ["Recent %_Messages" (view-lossage t)] 1526 ["Describe %_Function..." describe-function]
1571 ["Recent %_Keystrokes" view-lossage] 1527 ["Describe %_Variable..." describe-variable]
1572 ["Recent %_Warnings" view-warnings] 1528 ["%_Locate Command in Keymap..." where-is])
1573 ["Send %_Bug Report..." report-xemacs-bug 1529 ,@(when (featurep 'mule)
1574 :active (fboundp 'report-xemacs-bug)]))) 1530 `(("Internationa%_l"
1531 ("Describe %_Language Support"
1532 :filter
1533 ,#'(lambda (menu)
1534 (menu-split-long-menu-and-sort
1535 (mapcar #'(lambda (entry)
1536 `[ ,(car entry)
1537 (describe-language-environment
1538 ',(car entry))
1539 :style radio
1540 :selected
1541 ,(equal (car entry)
1542 current-language-environment)])
1543 language-info-alist)
1544 )))
1545 ["Describe %_Input Method" describe-input-method]
1546 ["Describe Current %_Coding Systems"
1547 describe-current-coding-system]
1548 ["Show Character %_Table" view-charset-by-menu]
1549 ;; not implemented yet
1550 ["Show %_Diagnosis for MULE" mule-diag :active nil]
1551 ["Show \"%_hello\" in Many Languages" view-hello-file]
1552 )))
1553 ("%_Other"
1554 ["%_Current Installation Info" describe-installation
1555 :active (boundp 'Installation-string)]
1556 ["%_Known Problems" view-xemacs-problems ]
1557 ["%_Obtaining the Latest Version" describe-distribution]
1558 ["%_No Warranty" describe-no-warranty]
1559 ["XEmacs %_License" describe-copying]
1560 ["Find %_Packages" finder-by-keyword]
1561 ["View %_Splash Screen" xemacs-splash-buffer]
1562 ["%_Unix Manual..." manual-entry])
1563 "-----"
1564 ["Recent %_Messages" (view-lossage t)]
1565 ["Recent %_Keystrokes" view-lossage]
1566 ["Recent %_Warnings" view-warnings]
1567 ["Send %_Bug Report..." report-xemacs-bug
1568 :active (fboundp 'report-xemacs-bug)]))
1569 "The default XEmacs menubar.
1570 See the documentation for `current-menubar' for details of the syntax
1571 used here.")
1575 1572
1576 1573
1577 (defun init-menubar-at-startup () 1574 (defun init-menubar-at-startup ()
1578 "Don't call this. 1575 "Don't call this.
1579 Adds `Load init files' button to menubar when starting up with -q." 1576 Adds `Load init files' button to menubar when starting up with -q."
1927 (not (string= (car lang) "ASCII")) 1924 (not (string= (car lang) "ASCII"))
1928 ;; skip current language, since we already 1925 ;; skip current language, since we already
1929 ;; included it first 1926 ;; included it first
1930 (not (string= (car lang) 1927 (not (string= (car lang)
1931 current-language-environment)) 1928 current-language-environment))
1929 ;; Hackish approach; if a language environment
1930 ;; doesn't have associated locale information,
1931 ;; it's not the preferred implementation for that
1932 ;; language. Don't use it.
1933 (assq 'locale lang)
1932 `([,(car lang) 1934 `([,(car lang)
1933 (help-with-tutorial nil ,(car lang))])))) 1935 (help-with-tutorial nil ,(car lang))]))))
1934 language-info-alist) 1936 language-info-alist)
1935 ;; Non mule tutorials. 1937 ;; Non mule tutorials.
1936 (mapcar #'(lambda (lang) 1938 (mapcar #'(lambda (lang)