1 ;;; cus-start.el --- define customization properties of builtins
3 ;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004,
4 ;; 2005, 2006, 2007 Free Software Foundation, Inc.
6 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 3, or (at your option)
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 ;; Boston, MA 02110-1301, USA.
28 ;; This file adds customize support for built-in variables.
30 ;; While dumping Emacs, this file is loaded, but it only records
31 ;; the standard values; it does not do the rest of the job.
32 ;; Later on, if the user makes a customization buffer,
33 ;; this file is loaded again with (require 'cus-start);
34 ;; then it does the whole job.
38 (let ((all '(;; abbrev.c
39 (abbrev-all-caps abbrev-mode boolean
)
40 (pre-abbrev-expand-hook abbrev-mode hook
)
42 (gc-cons-threshold alloc integer
)
43 (garbage-collection-messages alloc boolean
)
45 (mode-line-format mode-line sexp
) ;Hard to do right.
46 (default-major-mode internal function
)
47 (enable-multibyte-characters mule boolean
)
48 (case-fold-search matching boolean
)
49 (fill-column fill integer
)
50 (left-margin fill integer
)
51 (tab-width editing-basics integer
)
52 (ctl-arrow display boolean
)
53 (truncate-lines display boolean
)
54 (selective-display-ellipses display boolean
)
55 (indicate-empty-lines fringe boolean
)
56 (indicate-buffer-boundaries
59 (const :tag
"No indicators" nil
)
60 (const :tag
"On left, with arrows" left
)
61 (const :tag
"On right, with arrows" right
)
62 (set :tag
"Pick your own design"
64 :format
"%{%t%}:\n%v\n%d"
65 :doc
"You can specify a default and then override it \
66 for individual indicators.
67 Leaving \"Default\" unchecked is equivalent with specifying a default of
69 (choice :tag
"Default"
71 (const :tag
"Do not show" (t . nil
))
72 (const :tag
"On the left" (t . left
))
73 (const :tag
"On the right" (t . right
)))
76 (const :tag
"Do not show" (top . nil
))
77 (const :tag
"On the left" (top . left
))
78 (const :tag
"On the right" (top . right
)))
80 :value
(bottom . left
)
81 (const :tag
"Do not show" (bottom . nil
))
82 (const :tag
"On the left" (bottom . left
))
83 (const :tag
"On the right" (bottom . right
)))
84 (choice :tag
"Up arrow"
86 (const :tag
"Do not show" (up . nil
))
87 (const :tag
"On the left" (up . left
))
88 (const :tag
"On the right" (up . right
)))
89 (choice :tag
"Down arrow"
91 (const :tag
"Do not show" (down . nil
))
92 (const :tag
"On the left" (down . left
))
93 (const :tag
"On the right" (down . right
))))
94 (other :tag
"On left, no arrows" t
)))
95 (scroll-up-aggressively windows
96 (choice (const :tag
"off" nil
) number
)
98 (scroll-down-aggressively windows
99 (choice (const :tag
"off" nil
) number
)
101 (line-spacing display
(choice (const :tag
"none" nil
) integer
))
103 (mark-even-if-inactive editing-basics boolean
)
105 (shell-file-name execute file
)
107 (repeat (choice (const :tag
"default directory" nil
)
108 (directory :format
"%v"))))
110 (inhibit-eol-conversion mule boolean
)
111 (eol-mnemonic-undecided mule string
)
112 (eol-mnemonic-unix mule string
)
113 (eol-mnemonic-dos mule string
)
114 (eol-mnemonic-mac mule string
)
115 (file-coding-system-alist
118 :key-type
(regexp :tag
"File regexp")
120 :value
(undecided . undecided
)
121 (cons :tag
"Encoding/decoding pair"
122 :value
(undecided . undecided
)
123 (coding-system :tag
"Decoding")
124 (coding-system :tag
"Encoding"))
126 :tag
"Single coding system"
128 :match
(lambda (widget value
)
129 (and value
(not (functionp value
)))))
130 (function :value ignore
))))
131 (selection-coding-system mule coding-system
)
133 (completion-ignored-extensions dired
134 (repeat (string :format
"%v")))
136 (baud-rate display integer
)
137 (inverse-video display boolean
)
138 (visible-bell display boolean
)
139 (no-redraw-on-reenter display boolean
)
141 (user-full-name mail string
)
143 (max-specpdl-size limits integer
)
144 (max-lisp-eval-depth limits integer
)
145 (stack-trace-on-error debug
146 (choice (const :tag
"off")
147 (repeat :menu-tag
"When"
149 (symbol :format
"%v"))
150 (const :tag
"always" t
)))
151 (debug-on-error debug
152 (choice (const :tag
"off")
153 (repeat :menu-tag
"When"
155 (symbol :format
"%v"))
156 (const :tag
"always" t
)))
157 (debug-ignored-errors debug
(repeat (choice symbol regexp
)))
159 (choice (const :tag
"off")
160 (repeat :menu-tag
"When"
162 (symbol :format
"%v"))
163 (const :tag
"always" t
)))
165 (insert-default-directory minibuffer boolean
)
166 (read-file-name-completion-ignore-case minibuffer boolean
"22.1")
168 (use-dialog-box menu boolean
"21.1")
169 (use-file-dialog menu boolean
"22.1")
170 (focus-follows-mouse frames boolean
"20.3")
172 (default-frame-alist frames
173 (repeat (cons :format
"%v"
174 (symbol :tag
"Parameter")
175 (sexp :tag
"Value"))))
176 (mouse-highlight mouse
(choice (const :tag
"disabled" nil
)
177 (const :tag
"always shown" t
)
178 (other :tag
"hidden by keypress" 1)))
180 (overflow-newline-into-fringe fringe boolean
)
182 (indent-tabs-mode indent boolean
)
184 (meta-prefix-char keyboard character
)
185 (auto-save-interval auto-save integer
)
186 (auto-save-timeout auto-save
(choice (const :tag
"off" nil
)
187 (integer :format
"%v")))
188 (echo-keystrokes minibuffer number
)
189 (polling-period keyboard integer
)
190 (double-click-time mouse
(restricted-sexp
191 :match-alternatives
(integerp 'nil
't
)))
192 (double-click-fuzz mouse integer
)
193 (inhibit-local-menu-bar-menus menu boolean
)
194 (help-char keyboard character
)
195 (help-event-list keyboard
(repeat (sexp :format
"%v")))
196 (menu-prompting menu boolean
)
197 (suggest-key-bindings keyboard
(choice (const :tag
"off" nil
)
198 (integer :tag
"time" 2)
201 (mac-dnd-known-types mac
(repeat string
) "22.1")
203 (mac-control-modifier mac
(choice (const :tag
"No modifier" nil
)
204 (const control
) (const meta
)
205 (const alt
) (const hyper
)
206 (const super
)) "22.1")
207 (mac-command-modifier mac
(choice (const :tag
"No modifier" nil
)
208 (const control
) (const meta
)
209 (const alt
) (const hyper
)
210 (const super
)) "22.1")
211 (mac-option-modifier mac
(choice (const :tag
"No modifier (work as option)" nil
)
212 (const control
) (const meta
)
213 (const alt
) (const hyper
)
214 (const super
)) "22.1")
215 (mac-function-modifier mac
216 (choice (const :tag
"No modifier (work as function)" nil
)
217 (const control
) (const meta
)
218 (const alt
) (const hyper
)
219 (const super
)) "22.1")
220 (mac-emulate-three-button-mouse mac
221 (choice (const :tag
"No emulation" nil
)
222 (const :tag
"Option->2, Command->3" t
)
223 (const :tag
"Command->2, Option->3" reverse
))
225 (mac-wheel-button-is-mouse-2 mac boolean
"22.1")
226 (mac-pass-command-to-system mac boolean
"22.1")
227 (mac-pass-control-to-system mac boolean
"22.1")
228 (mac-allow-anti-aliasing mac boolean
"22.1")
229 (mac-ts-script-language-on-focus mac
230 (choice (const :tag
"System default behavior" nil
)
231 (const :tag
"Restore to script/language used in the last focus frame" t
)
232 (cons :tag
"Specify script/language"
233 (integer :tag
"Script code")
234 (integer :tag
"Language code")))
237 ;; This is not good news because it will use the wrong
238 ;; version-specific directories when you upgrade. We need
239 ;; customization of the front of the list, maintaining the standard
240 ;; value intact at the back.
241 ;;; (load-path environment
242 ;;; (repeat (choice :tag "[Current dir?]"
243 ;;; :format "%[Current dir?%] %v"
244 ;;; (const :tag " current dir" nil)
245 ;;; (directory :format "%v"))))
247 (completion-auto-help minibuffer boolean
)
248 (enable-recursive-minibuffers minibuffer boolean
)
249 (history-length minibuffer
250 (choice (const :tag
"Infinite" t
)
252 (history-delete-duplicates minibuffer boolean
)
253 (minibuffer-prompt-properties
257 (const :tag
"Read-Only"
258 :doc
"Prevent prompt from being modified"
262 (const :tag
"Don't Enter"
263 :doc
"Prevent point from ever entering prompt"
266 (point-entered minibuffer-avoid-prompt
)))
268 :tag
"Other Properties"
271 (symbol :tag
"Property")
272 (sexp :tag
"Value"))))
274 (minibuffer-auto-raise minibuffer boolean
)
275 ;; options property set at end
276 (read-buffer-function minibuffer
278 (function-item iswitchb-read-buffer
)
281 (dos-unsupported-char-glyph display integer
)
283 (delete-exited-processes processes-basics boolean
)
285 (parse-sexp-ignore-comments editing-basics boolean
)
286 (words-include-escapes editing-basics boolean
)
287 (open-paren-in-column-0-is-defun-start editing-basics boolean
290 (visible-cursor cursor boolean
"22.1")
292 (undo-limit undo integer
)
293 (undo-strong-limit undo integer
)
294 (undo-outer-limit undo
296 (const :tag
"No limit"
300 the undo info for the current command never gets discarded.
301 This should only be chosen under exceptional circumstances,
302 since it could result in memory overflow and make Emacs crash."
306 (temp-buffer-show-function windows
(choice (const nil
) function
))
307 (display-buffer-function windows
(choice (const nil
) function
))
308 (pop-up-frames frames boolean
)
309 (pop-up-frame-function frames function
)
310 (special-display-buffer-names
312 (repeat (choice :tag
"Buffer"
314 (string :format
"%v")
315 (cons :tag
"With attributes"
318 (string :format
"%v")
319 (repeat :tag
"Attributes"
321 (symbol :tag
"Parameter")
322 (sexp :tag
"Value")))))))
323 (special-display-regexps
325 (repeat (choice :tag
"Buffer"
327 (regexp :format
"%v")
328 (cons :tag
"With attributes"
331 (regexp :format
"%v")
332 (repeat :tag
"Attributes"
334 (symbol :tag
"Parameter")
335 (sexp :tag
"Value")))))))
336 (special-display-function frames function
)
337 (same-window-buffer-names windows
(repeat (string :format
"%v")))
338 (same-window-regexps windows
(repeat (regexp :format
"%v")))
339 (pop-up-windows windows boolean
)
340 (even-window-heights windows boolean
)
341 (next-screen-context-lines windows integer
)
342 (split-height-threshold windows integer
)
343 (window-min-height windows integer
)
344 (window-min-width windows integer
)
345 (scroll-preserve-screen-position
347 (const :tag
"Off (nil)" :value nil
)
348 (const :tag
"Full screen (t)" :value t
)
349 (other :tag
"Always" 1)))
350 (display-buffer-reuse-frames windows boolean
"21.1")
352 (scroll-step windows integer
)
353 (scroll-conservatively windows integer
)
354 (scroll-margin windows integer
)
355 (hscroll-margin windows integer
"22.1")
356 (hscroll-step windows number
"22.1")
357 (truncate-partial-width-windows display boolean
)
358 (mode-line-inverse-video mode-line boolean
)
359 (mode-line-in-non-selected-windows mode-line boolean
"22.1")
360 (line-number-display-limit display
362 (const :tag
"No limit" nil
)))
363 (line-number-display-limit-width display integer
)
364 (highlight-nonselected-windows display boolean
)
365 (message-log-max debug
(choice (const :tag
"Disable" nil
)
366 (integer :menu-tag
"lines"
368 (other :tag
"Unlimited" t
)))
369 (unibyte-display-via-language-environment mule boolean
)
370 (blink-cursor-alist cursor alist
"22.1")
371 (overline-margin display integer
"22.1")
372 (mouse-autoselect-window
374 (const :tag
"Off (nil)" :value nil
)
375 (const :tag
"Immediate" :value t
)
376 (number :tag
"Delay by secs" :value
0.5)) "22.1")
378 (scalable-fonts-allowed display boolean
)
380 (x-bitmap-file-path installation
381 (repeat (directory :format
"%v")))
382 (x-gtk-use-old-file-dialog menu boolean
"22.1")
383 (x-gtk-show-hidden-files menu boolean
"22.1")
384 (x-gtk-file-dialog-help-text menu boolean
"22.1")
385 (x-gtk-whole-detached-tool-bar x boolean
"22.1")
387 (x-use-underline-position-properties display boolean
"22.1")
388 (x-underline-at-descent-line display boolean
"22.1")
389 (x-stretch-cursor display boolean
"21.1")))
390 this symbol group type standard version native-p
391 ;; This function turns a value
392 ;; into an expression which produces that value.
393 (quoter (lambda (sexp)
394 (if (or (memq sexp
'(t nil
))
397 (memq (car sexp
) '(lambda)))
401 (list 'quote sexp
)))))
409 ;; If we did not specify any standard value expression above,
410 ;; use the current value as the standard value.
411 standard
(if (nthcdr 4 this
)
413 (when (default-boundp symbol
)
414 (funcall quoter
(default-value symbol
))))
415 ;; Don't complain about missing variables which are
416 ;; irrelevant to this platform.
417 native-p
(save-match-data
419 ((string-match "\\`dos-" (symbol-name symbol
))
420 (eq system-type
'ms-dos
))
421 ((string-match "\\`w32-" (symbol-name symbol
))
422 (eq system-type
'windows-nt
))
423 ((string-match "\\`mac-" (symbol-name symbol
))
424 (eq window-system
'mac
))
425 ((string-match "\\`x-.*gtk" (symbol-name symbol
))
428 (not (eq window-system
'pc
))
429 (not (eq window-system
'mac
))
430 (not (eq system-type
'windows-nt
)))))
431 ((string-match "\\`x-" (symbol-name symbol
))
432 (fboundp 'x-create-frame
))
433 ((string-match "selection" (symbol-name symbol
))
434 (fboundp 'x-selection-exists-p
))
435 ((string-match "fringe" (symbol-name symbol
))
436 (fboundp 'define-fringe-bitmap
))
438 (if (not (boundp symbol
))
439 ;; If variables are removed from C code, give an error here!
441 (message "Note, built-in variable `%S' not bound" symbol
))
442 ;; Save the standard value, unless we already did.
443 (or (get symbol
'standard-value
)
444 (put symbol
'standard-value
(list standard
)))
445 ;; If this is NOT while dumping Emacs,
446 ;; set up the rest of the customization info.
448 ;; Add it to the right group.
449 (custom-add-to-group group symbol
'custom-variable
)
451 (put symbol
'custom-type type
)
452 (put symbol
'custom-version version
)))))
454 (custom-add-to-group 'iswitchb
'read-buffer-function
'custom-variable
)
455 (custom-add-to-group 'font-lock
'open-paren-in-column-0-is-defun-start
457 (put 'selection-coding-system
'custom-set
458 (lambda (symbol value
)
459 (set-selection-coding-system value
)
462 ;; Record cus-start as loaded
463 ;; if we have set up all the info that we can set up.
464 ;; Don't record cus-start as loaded
465 ;; if we have set up only the standard values.
467 (provide 'cus-start
))
469 ;;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60
470 ;;; cus-start.el ends here