Remove `tiny change' flags from my log entries.
[bpt/emacs.git] / lisp / cus-start.el
CommitLineData
1cd7adc6 1;;; cus-start.el --- define customization properties of builtins
1444b0c0 2;;
0d30b337 3;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004,
d7a0267c 4;; 2005, 2006, 2007 Free Software Foundation, Inc.
1444b0c0
PA
5;;
6;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
7;; Keywords: internal
8
c2383d2d
RS
9;; This file is part of GNU Emacs.
10
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 2, or (at your option)
14;; any later version.
15
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.
20
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
086add15
LK
23;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24;; Boston, MA 02110-1301, USA.
c2383d2d 25
1444b0c0
PA
26;;; Commentary:
27;;
4883633e 28;; This file adds customize support for built-in variables.
1444b0c0 29
4883633e
RS
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.
1444b0c0 35
4883633e 36;;; Code:
1444b0c0 37
71296446 38(let ((all '(;; abbrev.c
1444b0c0
PA
39 (abbrev-all-caps abbrev-mode boolean)
40 (pre-abbrev-expand-hook abbrev-mode hook)
41 ;; alloc.c
42 (gc-cons-threshold alloc integer)
0f014aa1 43 (garbage-collection-messages alloc boolean)
1444b0c0
PA
44 ;; buffer.c
45 (mode-line-format modeline sexp) ;Hard to do right.
46 (default-major-mode internal function)
924ef223 47 (enable-multibyte-characters mule boolean)
1444b0c0
PA
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)
1444b0c0 54 (selective-display-ellipses display boolean)
516b77a3 55 (indicate-empty-lines fringe boolean)
eb94dac6
LT
56 (indicate-buffer-boundaries
57 fringe
58 (choice
59 (const :tag "No indicators" nil)
60 (const :tag "On left, with arrows" left)
61 (const :tag "On right, with arrows" right)
a4fbb790
LT
62 (set :tag "Pick your own design"
63 :value ((t . nil))
64 :format "%{%t%}:\n%v\n%d"
65 :doc "You can specify a default and then override it \
66for individual indicators.
67Leaving \"Default\" unchecked is equivalent with specifying a default of
68\"Do not show\"."
69 (choice :tag "Default"
70 :value (t . nil)
71 (const :tag "Do not show" (t . nil))
72 (const :tag "On the left" (t . left))
73 (const :tag "On the right" (t . right)))
74 (choice :tag "Top"
75 :value (top . left)
76 (const :tag "Do not show" (top . nil))
77 (const :tag "On the left" (top . left))
78 (const :tag "On the right" (top . right)))
79 (choice :tag "Bottom"
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"
85 :value (up . left)
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"
90 :value (down . left)
91 (const :tag "Do not show" (down . nil))
92 (const :tag "On the left" (down . left))
93 (const :tag "On the right" (down . right))))
516b77a3 94 (other :tag "On left, no arrows" t)))
c6d57325
RS
95 (scroll-up-aggressively windows
96 (choice (const :tag "off" nil) number)
97 "21.1")
98 (scroll-down-aggressively windows
99 (choice (const :tag "off" nil) number)
100 "21.1")
b12e97dc 101 (line-spacing display (choice (const :tag "none" nil) integer))
1444b0c0
PA
102 ;; callint.c
103 (mark-even-if-inactive editing-basics boolean)
104 ;; callproc.c
105 (shell-file-name execute file)
106 (exec-path execute
f747a488 107 (repeat (choice (const :tag "default directory" nil)
72e869ba 108 (directory :format "%v"))))
5fc9eb7c
DL
109 ;; coding.c
110 (inhibit-eol-conversion mule boolean)
de0d1fc5
EZ
111 (eol-mnemonic-undecided mule string)
112 (eol-mnemonic-unix mule string)
113 (eol-mnemonic-dos mule string)
114 (eol-mnemonic-mac mule string)
13eb63ff
DL
115 (file-coding-system-alist
116 mule
117 (alist
118 :key-type (regexp :tag "File regexp")
6bd7e3b4
KY
119 :value-type
120 (choice
121 :value (undecided . undecided)
122 (cons :tag "Encoding/decoding pair"
123 :value (undecided . undecided)
124 (coding-system :tag "Decoding")
125 (coding-system :tag "Encoding"))
126 (coding-system
127 :tag "Single coding system"
128 :value undecided
129 :validate
130 (lambda (widget)
131 (unless (or (coding-system-p (widget-value widget))
132 (functionp (widget-value widget)))
133 (widget-put
134 widget
135 :error (format "Invalid coding system: %S"
136 (widget-value widget)))
137 widget)))
138 (function :value ignore))))
e5f51929 139 (selection-coding-system mule coding-system)
1444b0c0 140 ;; dired.c
71296446 141 (completion-ignored-extensions dired
1444b0c0 142 (repeat (string :format "%v")))
0849a37e 143 ;; dispnew.c
1444b0c0
PA
144 (baud-rate display integer)
145 (inverse-video display boolean)
146 (visible-bell display boolean)
147 (no-redraw-on-reenter display boolean)
148 ;; editfns.c
149 (user-full-name mail string)
150 ;; eval.c
151 (max-specpdl-size limits integer)
152 (max-lisp-eval-depth limits integer)
f8add097
RS
153 (max-mini-window-height limits
154 (choice (const :tag "quarter screen" nil)
155 number))
1444b0c0
PA
156 (stack-trace-on-error debug
157 (choice (const :tag "off")
158 (repeat :menu-tag "When"
159 :value (nil)
160 (symbol :format "%v"))
161 (const :tag "always" t)))
71296446 162 (debug-on-error debug
1444b0c0
PA
163 (choice (const :tag "off")
164 (repeat :menu-tag "When"
165 :value (nil)
166 (symbol :format "%v"))
167 (const :tag "always" t)))
168 (debug-ignored-errors debug (repeat (choice symbol regexp)))
507c9247
RS
169 (debug-on-quit debug
170 (choice (const :tag "off")
171 (repeat :menu-tag "When"
172 :value (nil)
173 (symbol :format "%v"))
174 (const :tag "always" t)))
1444b0c0
PA
175 ;; fileio.c
176 (insert-default-directory minibuffer boolean)
bf247b6e 177 (read-file-name-completion-ignore-case minibuffer boolean "22.1")
78976e0a 178 ;; fns.c
37328bcd 179 (use-dialog-box menu boolean "21.1")
bf247b6e 180 (use-file-dialog menu boolean "22.1")
1444b0c0
PA
181 ;; frame.c
182 (default-frame-alist frames
183 (repeat (cons :format "%v"
184 (symbol :tag "Parameter")
185 (sexp :tag "Value"))))
140fb7ff
KS
186 (mouse-highlight mouse (choice (const :tag "disabled" nil)
187 (const :tag "always shown" t)
188 (other :tag "hidden by keypress" 1)))
48d707c5 189 ;; fringe.c
516b77a3 190 (overflow-newline-into-fringe fringe boolean)
1444b0c0 191 ;; indent.c
01892a52 192 (indent-tabs-mode indent boolean)
1444b0c0
PA
193 ;; keyboard.c
194 (meta-prefix-char keyboard character)
195 (auto-save-interval auto-save integer)
196 (auto-save-timeout auto-save (choice (const :tag "off" nil)
197 (integer :format "%v")))
ac1b1728 198 (echo-keystrokes minibuffer number)
1444b0c0 199 (polling-period keyboard integer)
4db2b1c7
RS
200 (double-click-time mouse (restricted-sexp
201 :match-alternatives (integerp 'nil 't)))
3284b301 202 (double-click-fuzz mouse integer)
1444b0c0
PA
203 (inhibit-local-menu-bar-menus menu boolean)
204 (help-char keyboard character)
205 (help-event-list keyboard (repeat (sexp :format "%v")))
206 (menu-prompting menu boolean)
1444b0c0
PA
207 (suggest-key-bindings keyboard (choice (const :tag "off" nil)
208 (integer :tag "time" 2)
79221864 209 (other :tag "on")))
2f566b18
YM
210 ;; macselect.c
211 (mac-dnd-known-types mac (repeat string) "22.1")
814b36fe
YM
212 ;; macterm.c
213 (mac-control-modifier mac (choice (const :tag "No modifier" nil)
214 (const control) (const meta)
215 (const alt) (const hyper)
216 (const super)) "22.1")
217 (mac-command-modifier mac (choice (const :tag "No modifier" nil)
218 (const control) (const meta)
219 (const alt) (const hyper)
220 (const super)) "22.1")
221 (mac-option-modifier mac (choice (const :tag "No modifier (work as option)" nil)
222 (const control) (const meta)
223 (const alt) (const hyper)
224 (const super)) "22.1")
225 (mac-function-modifier mac
226 (choice (const :tag "No modifier (work as function)" nil)
227 (const control) (const meta)
228 (const alt) (const hyper)
229 (const super)) "22.1")
230 (mac-emulate-three-button-mouse mac
231 (choice (const :tag "No emulation" nil)
232 (const :tag "Option->2, Command->3" t)
233 (const :tag "Command->2, Option->3" reverse))
234 "22.1")
235 (mac-wheel-button-is-mouse-2 mac boolean "22.1")
236 (mac-pass-command-to-system mac boolean "22.1")
237 (mac-pass-control-to-system mac boolean "22.1")
238 (mac-allow-anti-aliasing mac boolean "22.1")
2d4a5c50
YM
239 (mac-ts-script-language-on-focus mac
240 (choice (const :tag "System default behavior" nil)
241 (const :tag "Restore to script/language used in the last focus frame" t)
242 (cons :tag "Specify script/language"
243 (integer :tag "Script code")
244 (integer :tag "Language code")))
245 "22.1")
5f537e54 246
37328bcd
DL
247;; This is not good news because it will use the wrong
248;; version-specific directories when you upgrade. We need
249;; customization of the front of the list, maintaining the standard
250;; value intact at the back.
71296446 251;;; (load-path environment
37328bcd
DL
252;;; (repeat (choice :tag "[Current dir?]"
253;;; :format "%[Current dir?%] %v"
254;;; (const :tag " current dir" nil)
255;;; (directory :format "%v"))))
1444b0c0
PA
256 ;; minibuf.c
257 (completion-auto-help minibuffer boolean)
258 (enable-recursive-minibuffers minibuffer boolean)
408f56b2
RS
259 (history-length minibuffer
260 (choice (const :tag "Infinite" t)
261 integer))
1e64386e 262 (history-delete-duplicates minibuffer boolean)
8f62f2b8
MB
263 (minibuffer-prompt-properties
264 minibuffer
265 (list
266 (checklist :inline t
267 (const :tag "Read-Only"
268 :doc "Prevent prompt from being modified"
269 :format "%t%n%h"
270 :inline t
271 (read-only t))
c9133fa6 272 (const :tag "Don't Enter"
8f62f2b8
MB
273 :doc "Prevent point from ever entering prompt"
274 :format "%t%n%h"
275 :inline t
276 (point-entered minibuffer-avoid-prompt)))
277 (repeat :inline t
278 :tag "Other Properties"
279 (list :inline t
280 :format "%v"
281 (symbol :tag "Property")
ecf5279a
DL
282 (sexp :tag "Value"))))
283 "21.1")
1444b0c0 284 (minibuffer-auto-raise minibuffer boolean)
ecf5279a 285 ;; options property set at end
a8a1b05d
DL
286 (read-buffer-function minibuffer
287 (choice (const nil)
288 (function-item iswitchb-read-buffer)
289 function))
b78fba02
EZ
290 ;; msdos.c
291 (dos-unsupported-char-glyph display integer)
1444b0c0 292 ;; process.c
4883633e 293 (delete-exited-processes processes-basics boolean)
1444b0c0
PA
294 ;; syntax.c
295 (parse-sexp-ignore-comments editing-basics boolean)
296 (words-include-escapes editing-basics boolean)
779d0b80
DL
297 (open-paren-in-column-0-is-defun-start editing-basics boolean
298 "21.1")
98e071b5
SM
299 ;; term.c
300 (visible-cursor cursor boolean "22.1")
0f08b956
LT
301 ;; undo.c
302 (undo-limit undo integer)
303 (undo-strong-limit undo integer)
304 (undo-outer-limit undo
305 (choice integer
306 (const :tag "No limit"
307 :format "%t\n%d"
308 :doc
309 "With this choice, \
310the undo info for the current command never gets discarded.
311This should only be chosen under exceptional circumstances,
312since it could result in memory overflow and make Emacs crash."
313 nil))
314 "22.1")
1444b0c0 315 ;; window.c
4cb464b7
DL
316 (temp-buffer-show-function windows (choice (const nil) function))
317 (display-buffer-function windows (choice (const nil) function))
1444b0c0
PA
318 (pop-up-frames frames boolean)
319 (pop-up-frame-function frames function)
71296446
JB
320 (special-display-buffer-names
321 frames
1444b0c0
PA
322 (repeat (choice :tag "Buffer"
323 :value ""
324 (string :format "%v")
325 (cons :tag "With attributes"
326 :format "%v"
327 :value ("" . nil)
328 (string :format "%v")
329 (repeat :tag "Attributes"
330 (cons :format "%v"
331 (symbol :tag "Parameter")
332 (sexp :tag "Value")))))))
333 (special-display-regexps
71296446 334 frames
1444b0c0
PA
335 (repeat (choice :tag "Buffer"
336 :value ""
337 (regexp :format "%v")
338 (cons :tag "With attributes"
339 :format "%v"
340 :value ("" . nil)
341 (regexp :format "%v")
342 (repeat :tag "Attributes"
343 (cons :format "%v"
344 (symbol :tag "Parameter")
345 (sexp :tag "Value")))))))
346 (special-display-function frames function)
347 (same-window-buffer-names windows (repeat (string :format "%v")))
348 (same-window-regexps windows (repeat (regexp :format "%v")))
349 (pop-up-windows windows boolean)
d2946490 350 (even-window-heights windows boolean)
74f54b54 351 (next-screen-context-lines windows integer)
1444b0c0
PA
352 (split-height-threshold windows integer)
353 (window-min-height windows integer)
354 (window-min-width windows integer)
7704b6b1
KS
355 (scroll-preserve-screen-position
356 windows (choice
357 (const :tag "Off (nil)" :value nil)
358 (const :tag "Full screen (t)" :value t)
359 (other :tag "Always" 1)))
13eb63ff 360 (display-buffer-reuse-frames windows boolean "21.1")
1444b0c0
PA
361 ;; xdisp.c
362 (scroll-step windows integer)
ccbb360e
RS
363 (scroll-conservatively windows integer)
364 (scroll-margin windows integer)
4e371ce8
EZ
365 (hscroll-margin windows integer "22.1")
366 (hscroll-step windows number "22.1")
1444b0c0 367 (truncate-partial-width-windows display boolean)
67ee1125 368 (mode-line-inverse-video modeline boolean)
4e371ce8 369 (mode-line-in-non-selected-windows modeline boolean "22.1")
37328bcd
DL
370 (line-number-display-limit display
371 (choice integer
372 (const :tag "No limit" nil)))
779d0b80 373 (line-number-display-limit-width display integer)
1444b0c0
PA
374 (highlight-nonselected-windows display boolean)
375 (message-log-max debug (choice (const :tag "Disable" nil)
376 (integer :menu-tag "lines"
377 :format "%v")
79221864 378 (other :tag "Unlimited" t)))
daba3e25 379 (unibyte-display-via-language-environment mule boolean)
bf247b6e 380 (blink-cursor-alist cursor alist "22.1")
03c25271 381 (overline-margin display integer "22.1")
612c16f1
CY
382 (mouse-autoselect-window
383 display (choice
384 (const :tag "Off (nil)" :value nil)
385 (const :tag "Immediate" :value t)
386 (number :tag "Delay by secs" :value 0.5)) "22.1")
e5f51929
DL
387 ;; xfaces.c
388 (scalable-fonts-allowed display boolean)
1444b0c0
PA
389 ;; xfns.c
390 (x-bitmap-file-path installation
0849a37e 391 (repeat (directory :format "%v")))
c4823934 392 (x-gtk-use-old-file-dialog menu boolean "22.1")
91b5a204 393 (x-gtk-show-hidden-files menu boolean "22.1")
c4823934 394 (x-gtk-file-dialog-help-text menu boolean "22.1")
0dd95b49 395 (x-gtk-whole-detached-tool-bar x boolean "22.1")
0849a37e 396 ;; xterm.c
4e371ce8 397 (x-use-underline-position-properties display boolean "22.1")
03c25271 398 (x-underline-at-descent-line display boolean "22.1")
37328bcd 399 (x-stretch-cursor display boolean "21.1")))
a200d998 400 this symbol group type standard version native-p
4883633e
RS
401 ;; This function turns a value
402 ;; into an expression which produces that value.
403 (quoter (lambda (sexp)
404 (if (or (memq sexp '(t nil))
017266f8 405 (keywordp sexp)
4883633e
RS
406 (and (listp sexp)
407 (memq (car sexp) '(lambda)))
408 (stringp sexp)
37328bcd 409 (numberp sexp))
4883633e
RS
410 sexp
411 (list 'quote sexp)))))
71296446 412 (while all
1444b0c0
PA
413 (setq this (car all)
414 all (cdr all)
415 symbol (nth 0 this)
416 group (nth 1 this)
00377857 417 type (nth 2 this)
37328bcd 418 version (nth 3 this)
a200d998
RS
419 ;; If we did not specify any standard value expression above,
420 ;; use the current value as the standard value.
421 standard (if (nthcdr 4 this)
422 (nth 4 this)
720f4c79 423 (when (default-boundp symbol)
92233e7e 424 (funcall quoter (default-value symbol))))
00377857
EZ
425 ;; Don't complain about missing variables which are
426 ;; irrelevant to this platform.
427 native-p (save-match-data
428 (cond
429 ((string-match "\\`dos-" (symbol-name symbol))
430 (eq system-type 'ms-dos))
431 ((string-match "\\`w32-" (symbol-name symbol))
432 (eq system-type 'windows-nt))
814b36fe
YM
433 ((string-match "\\`mac-" (symbol-name symbol))
434 (eq window-system 'mac))
2702394e 435 ((string-match "\\`x-.*gtk" (symbol-name symbol))
6eb33acb 436 (or (boundp 'gtk)
b948abc8
EZ
437 (and window-system
438 (not (eq window-system 'pc))
814b36fe 439 (not (eq window-system 'mac))
6eb33acb 440 (not (eq system-type 'windows-nt)))))
197a09bf
EZ
441 ((string-match "\\`x-" (symbol-name symbol))
442 (fboundp 'x-create-frame))
6eb33acb
EZ
443 ((string-match "selection" (symbol-name symbol))
444 (fboundp 'x-selection-exists-p))
445 ((string-match "fringe" (symbol-name symbol))
446 (fboundp 'define-fringe-bitmap))
00377857 447 (t t))))
1444b0c0
PA
448 (if (not (boundp symbol))
449 ;; If variables are removed from C code, give an error here!
00377857
EZ
450 (and native-p
451 (message "Note, built-in variable `%S' not bound" symbol))
4883633e
RS
452 ;; Save the standard value, unless we already did.
453 (or (get symbol 'standard-value)
a200d998 454 (put symbol 'standard-value (list standard)))
4883633e
RS
455 ;; If this is NOT while dumping Emacs,
456 ;; set up the rest of the customization info.
457 (unless purify-flag
458 ;; Add it to the right group.
459 (custom-add-to-group group symbol 'custom-variable)
460 ;; Set the type.
37328bcd
DL
461 (put symbol 'custom-type type)
462 (put symbol 'custom-version version)))))
4883633e 463
ecf5279a 464(custom-add-to-group 'iswitchb 'read-buffer-function 'custom-variable)
779d0b80
DL
465(custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start
466 'custom-variable)
e5f51929
DL
467(put 'selection-coding-system 'custom-set
468 (lambda (symbol value)
469 (set-selection-coding-system value)
470 (set symbol value)))
ecf5279a 471
4883633e
RS
472;; Record cus-start as loaded
473;; if we have set up all the info that we can set up.
474;; Don't record cus-start as loaded
475;; if we have set up only the standard values.
476(unless purify-flag
477 (provide 'cus-start))
1444b0c0 478
ab5796a9 479;;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60
1cd7adc6 480;;; cus-start.el ends here