(all): Make `indicate-buffer-boundaries' display values set outside
[bpt/emacs.git] / lisp / cus-start.el
CommitLineData
1cd7adc6 1;;; cus-start.el --- define customization properties of builtins
1444b0c0 2;;
92233e7e 3;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
1444b0c0
PA
4;;
5;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
6;; Keywords: internal
7
c2383d2d
RS
8;; This file is part of GNU Emacs.
9
10;; GNU Emacs is free software; you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by
12;; the Free Software Foundation; either version 2, or (at your option)
13;; any later version.
14
15;; GNU Emacs is distributed in the hope that it will be useful,
16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;; GNU General Public License for more details.
19
20;; You should have received a copy of the GNU General Public License
21;; along with GNU Emacs; see the file COPYING. If not, write to the
086add15
LK
22;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23;; Boston, MA 02110-1301, USA.
c2383d2d 24
1444b0c0
PA
25;;; Commentary:
26;;
4883633e 27;; This file adds customize support for built-in variables.
1444b0c0 28
4883633e
RS
29;; While dumping Emacs, this file is loaded, but it only records
30;; the standard values; it does not do the rest of the job.
31;; Later on, if the user makes a customization buffer,
32;; this file is loaded again with (require 'cus-start);
33;; then it does the whole job.
1444b0c0 34
4883633e 35;;; Code:
1444b0c0 36
71296446 37(let ((all '(;; abbrev.c
1444b0c0
PA
38 (abbrev-all-caps abbrev-mode boolean)
39 (pre-abbrev-expand-hook abbrev-mode hook)
40 ;; alloc.c
41 (gc-cons-threshold alloc integer)
0f014aa1
LT
42 (garbage-collection-messages alloc boolean)
43 ;; undo.c
1444b0c0
PA
44 (undo-limit undo integer)
45 (undo-strong-limit undo integer)
3bf93f74
LT
46 (undo-outer-limit undo
47 (choice integer
48 (const :tag "No limit"
49 :format "%t\n%d"
50 :doc
51 "With this choice, \
52the undo info for the current command never gets discarded.
53This should only be chosen under exceptional circumstances,
54since it could result in memory overflow and make Emacs crash."
55 nil))
bf247b6e 56 "22.1")
1444b0c0
PA
57 ;; buffer.c
58 (mode-line-format modeline sexp) ;Hard to do right.
59 (default-major-mode internal function)
924ef223 60 (enable-multibyte-characters mule boolean)
1444b0c0
PA
61 (case-fold-search matching boolean)
62 (fill-column fill integer)
63 (left-margin fill integer)
64 (tab-width editing-basics integer)
65 (ctl-arrow display boolean)
66 (truncate-lines display boolean)
1444b0c0 67 (selective-display-ellipses display boolean)
eb94dac6
LT
68 (indicate-empty-lines fringe boolean "21.1")
69 (indicate-buffer-boundaries
70 fringe
71 (choice
72 (const :tag "No indicators" nil)
73 (const :tag "On left, with arrows" left)
74 (const :tag "On right, with arrows" right)
a4fbb790
LT
75 (set :tag "Pick your own design"
76 :value ((t . nil))
77 :format "%{%t%}:\n%v\n%d"
78 :doc "You can specify a default and then override it \
79for individual indicators.
80Leaving \"Default\" unchecked is equivalent with specifying a default of
81\"Do not show\"."
82 (choice :tag "Default"
83 :value (t . nil)
84 (const :tag "Do not show" (t . nil))
85 (const :tag "On the left" (t . left))
86 (const :tag "On the right" (t . right)))
87 (choice :tag "Top"
88 :value (top . left)
89 (const :tag "Do not show" (top . nil))
90 (const :tag "On the left" (top . left))
91 (const :tag "On the right" (top . right)))
92 (choice :tag "Bottom"
93 :value (bottom . left)
94 (const :tag "Do not show" (bottom . nil))
95 (const :tag "On the left" (bottom . left))
96 (const :tag "On the right" (bottom . right)))
97 (choice :tag "Up arrow"
98 :value (up . left)
99 (const :tag "Do not show" (up . nil))
100 (const :tag "On the left" (up . left))
101 (const :tag "On the right" (up . right)))
102 (choice :tag "Down arrow"
103 :value (down . left)
104 (const :tag "Do not show" (down . nil))
105 (const :tag "On the left" (down . left))
106 (const :tag "On the right" (down . right))))
3233c063 107 (other :tag "On left, no arrows" t))
eb94dac6 108 "22.1")
c6d57325
RS
109 (scroll-up-aggressively windows
110 (choice (const :tag "off" nil) number)
111 "21.1")
112 (scroll-down-aggressively windows
113 (choice (const :tag "off" nil) number)
114 "21.1")
1444b0c0
PA
115 ;; callint.c
116 (mark-even-if-inactive editing-basics boolean)
117 ;; callproc.c
118 (shell-file-name execute file)
119 (exec-path execute
f747a488 120 (repeat (choice (const :tag "default directory" nil)
72e869ba 121 (directory :format "%v"))))
5fc9eb7c
DL
122 ;; coding.c
123 (inhibit-eol-conversion mule boolean)
de0d1fc5
EZ
124 (eol-mnemonic-undecided mule string)
125 (eol-mnemonic-unix mule string)
126 (eol-mnemonic-dos mule string)
127 (eol-mnemonic-mac mule string)
13eb63ff
DL
128 (file-coding-system-alist
129 mule
130 (alist
131 :key-type (regexp :tag "File regexp")
132 :value-type (choice
133 :value (undecided . undecided)
134 (cons :tag "Encoding/decoding pair"
135 :value (undecided . undecided)
136 (coding-system :tag "Decoding")
137 (coding-system :tag "Encoding"))
138 (coding-system :tag "Single coding system"
139 :value undecided)
140 (function :value ignore))))
e5f51929 141 (selection-coding-system mule coding-system)
1444b0c0 142 ;; dired.c
71296446 143 (completion-ignored-extensions dired
1444b0c0 144 (repeat (string :format "%v")))
0849a37e 145 ;; dispnew.c
1444b0c0
PA
146 (baud-rate display integer)
147 (inverse-video display boolean)
148 (visible-bell display boolean)
149 (no-redraw-on-reenter display boolean)
150 ;; editfns.c
151 (user-full-name mail string)
152 ;; eval.c
153 (max-specpdl-size limits integer)
154 (max-lisp-eval-depth limits integer)
155 (stack-trace-on-error debug
156 (choice (const :tag "off")
157 (repeat :menu-tag "When"
158 :value (nil)
159 (symbol :format "%v"))
160 (const :tag "always" t)))
71296446 161 (debug-on-error debug
1444b0c0
PA
162 (choice (const :tag "off")
163 (repeat :menu-tag "When"
164 :value (nil)
165 (symbol :format "%v"))
166 (const :tag "always" t)))
167 (debug-ignored-errors debug (repeat (choice symbol regexp)))
507c9247
RS
168 (debug-on-quit debug
169 (choice (const :tag "off")
170 (repeat :menu-tag "When"
171 :value (nil)
172 (symbol :format "%v"))
173 (const :tag "always" t)))
1444b0c0
PA
174 ;; fileio.c
175 (insert-default-directory minibuffer boolean)
bf247b6e 176 (read-file-name-completion-ignore-case minibuffer boolean "22.1")
78976e0a 177 ;; fns.c
37328bcd 178 (use-dialog-box menu boolean "21.1")
bf247b6e 179 (use-file-dialog menu boolean "22.1")
1444b0c0
PA
180 ;; frame.c
181 (default-frame-alist frames
182 (repeat (cons :format "%v"
183 (symbol :tag "Parameter")
184 (sexp :tag "Value"))))
140fb7ff
KS
185 (mouse-highlight mouse (choice (const :tag "disabled" nil)
186 (const :tag "always shown" t)
187 (other :tag "hidden by keypress" 1)))
1444b0c0
PA
188 ;; indent.c
189 (indent-tabs-mode fill boolean)
190 ;; keyboard.c
191 (meta-prefix-char keyboard character)
192 (auto-save-interval auto-save integer)
193 (auto-save-timeout auto-save (choice (const :tag "off" nil)
194 (integer :format "%v")))
ac1b1728 195 (echo-keystrokes minibuffer number)
1444b0c0 196 (polling-period keyboard integer)
4db2b1c7
RS
197 (double-click-time mouse (restricted-sexp
198 :match-alternatives (integerp 'nil 't)))
3284b301 199 (double-click-fuzz mouse integer)
1444b0c0
PA
200 (inhibit-local-menu-bar-menus menu boolean)
201 (help-char keyboard character)
202 (help-event-list keyboard (repeat (sexp :format "%v")))
203 (menu-prompting menu boolean)
1444b0c0
PA
204 (suggest-key-bindings keyboard (choice (const :tag "off" nil)
205 (integer :tag "time" 2)
79221864 206 (other :tag "on")))
5f537e54 207
37328bcd
DL
208;; This is not good news because it will use the wrong
209;; version-specific directories when you upgrade. We need
210;; customization of the front of the list, maintaining the standard
211;; value intact at the back.
71296446 212;;; (load-path environment
37328bcd
DL
213;;; (repeat (choice :tag "[Current dir?]"
214;;; :format "%[Current dir?%] %v"
215;;; (const :tag " current dir" nil)
216;;; (directory :format "%v"))))
1444b0c0
PA
217 ;; minibuf.c
218 (completion-auto-help minibuffer boolean)
219 (enable-recursive-minibuffers minibuffer boolean)
408f56b2
RS
220 (history-length minibuffer
221 (choice (const :tag "Infinite" t)
222 integer))
1e64386e 223 (history-delete-duplicates minibuffer boolean)
8f62f2b8
MB
224 (minibuffer-prompt-properties
225 minibuffer
226 (list
227 (checklist :inline t
228 (const :tag "Read-Only"
229 :doc "Prevent prompt from being modified"
230 :format "%t%n%h"
231 :inline t
232 (read-only t))
233 (const :tag "Inviolable"
234 :doc "Prevent point from ever entering prompt"
235 :format "%t%n%h"
236 :inline t
237 (point-entered minibuffer-avoid-prompt)))
238 (repeat :inline t
239 :tag "Other Properties"
240 (list :inline t
241 :format "%v"
242 (symbol :tag "Property")
ecf5279a
DL
243 (sexp :tag "Value"))))
244 "21.1")
1444b0c0 245 (minibuffer-auto-raise minibuffer boolean)
ecf5279a 246 ;; options property set at end
a8a1b05d
DL
247 (read-buffer-function minibuffer
248 (choice (const nil)
249 (function-item iswitchb-read-buffer)
250 function))
b78fba02
EZ
251 ;; msdos.c
252 (dos-unsupported-char-glyph display integer)
1444b0c0 253 ;; process.c
4883633e 254 (delete-exited-processes processes-basics boolean)
1444b0c0
PA
255 ;; syntax.c
256 (parse-sexp-ignore-comments editing-basics boolean)
257 (words-include-escapes editing-basics boolean)
779d0b80
DL
258 (open-paren-in-column-0-is-defun-start editing-basics boolean
259 "21.1")
1444b0c0 260 ;; window.c
4cb464b7
DL
261 (temp-buffer-show-function windows (choice (const nil) function))
262 (display-buffer-function windows (choice (const nil) function))
1444b0c0
PA
263 (pop-up-frames frames boolean)
264 (pop-up-frame-function frames function)
71296446
JB
265 (special-display-buffer-names
266 frames
1444b0c0
PA
267 (repeat (choice :tag "Buffer"
268 :value ""
269 (string :format "%v")
270 (cons :tag "With attributes"
271 :format "%v"
272 :value ("" . nil)
273 (string :format "%v")
274 (repeat :tag "Attributes"
275 (cons :format "%v"
276 (symbol :tag "Parameter")
277 (sexp :tag "Value")))))))
278 (special-display-regexps
71296446 279 frames
1444b0c0
PA
280 (repeat (choice :tag "Buffer"
281 :value ""
282 (regexp :format "%v")
283 (cons :tag "With attributes"
284 :format "%v"
285 :value ("" . nil)
286 (regexp :format "%v")
287 (repeat :tag "Attributes"
288 (cons :format "%v"
289 (symbol :tag "Parameter")
290 (sexp :tag "Value")))))))
291 (special-display-function frames function)
292 (same-window-buffer-names windows (repeat (string :format "%v")))
293 (same-window-regexps windows (repeat (regexp :format "%v")))
294 (pop-up-windows windows boolean)
d2946490 295 (even-window-heights windows boolean)
74f54b54 296 (next-screen-context-lines windows integer)
1444b0c0
PA
297 (split-height-threshold windows integer)
298 (window-min-height windows integer)
299 (window-min-width windows integer)
bcc67965 300 (scroll-preserve-screen-position windows boolean)
13eb63ff 301 (display-buffer-reuse-frames windows boolean "21.1")
1444b0c0
PA
302 ;; xdisp.c
303 (scroll-step windows integer)
ccbb360e
RS
304 (scroll-conservatively windows integer)
305 (scroll-margin windows integer)
8b75db34
EZ
306 (hscroll-margin windows integer "21.3")
307 (hscroll-step windows number "21.3")
1444b0c0 308 (truncate-partial-width-windows display boolean)
67ee1125 309 (mode-line-inverse-video modeline boolean)
ec544bdd 310 (mode-line-in-non-selected-windows modeline boolean "21.3")
37328bcd
DL
311 (line-number-display-limit display
312 (choice integer
313 (const :tag "No limit" nil)))
779d0b80 314 (line-number-display-limit-width display integer)
1444b0c0
PA
315 (highlight-nonselected-windows display boolean)
316 (message-log-max debug (choice (const :tag "Disable" nil)
317 (integer :menu-tag "lines"
318 :format "%v")
79221864 319 (other :tag "Unlimited" t)))
daba3e25 320 (unibyte-display-via-language-environment mule boolean)
bf247b6e 321 (blink-cursor-alist cursor alist "22.1")
e5f51929
DL
322 ;; xfaces.c
323 (scalable-fonts-allowed display boolean)
1444b0c0
PA
324 ;; xfns.c
325 (x-bitmap-file-path installation
0849a37e 326 (repeat (directory :format "%v")))
bf247b6e 327 (x-use-old-gtk-file-dialog menu boolean "22.1")
0849a37e 328 ;; xterm.c
e8d9157b 329 (mouse-autoselect-window display boolean "21.3")
e369c773 330 (x-use-underline-position-properties display boolean "21.3")
37328bcd 331 (x-stretch-cursor display boolean "21.1")))
a200d998 332 this symbol group type standard version native-p
4883633e
RS
333 ;; This function turns a value
334 ;; into an expression which produces that value.
335 (quoter (lambda (sexp)
336 (if (or (memq sexp '(t nil))
017266f8 337 (keywordp sexp)
4883633e
RS
338 (and (listp sexp)
339 (memq (car sexp) '(lambda)))
340 (stringp sexp)
37328bcd 341 (numberp sexp))
4883633e
RS
342 sexp
343 (list 'quote sexp)))))
71296446 344 (while all
1444b0c0
PA
345 (setq this (car all)
346 all (cdr all)
347 symbol (nth 0 this)
348 group (nth 1 this)
00377857 349 type (nth 2 this)
37328bcd 350 version (nth 3 this)
a200d998
RS
351 ;; If we did not specify any standard value expression above,
352 ;; use the current value as the standard value.
353 standard (if (nthcdr 4 this)
354 (nth 4 this)
720f4c79 355 (when (default-boundp symbol)
92233e7e 356 (funcall quoter (default-value symbol))))
00377857
EZ
357 ;; Don't complain about missing variables which are
358 ;; irrelevant to this platform.
359 native-p (save-match-data
360 (cond
361 ((string-match "\\`dos-" (symbol-name symbol))
362 (eq system-type 'ms-dos))
363 ((string-match "\\`w32-" (symbol-name symbol))
364 (eq system-type 'windows-nt))
2702394e
EZ
365 ((string-match "\\`x-.*gtk" (symbol-name symbol))
366 (or (boundp 'gtk) (not (eq system-type 'windows-nt))))
197a09bf
EZ
367 ((string-match "\\`x-" (symbol-name symbol))
368 (fboundp 'x-create-frame))
00377857 369 (t t))))
1444b0c0
PA
370 (if (not (boundp symbol))
371 ;; If variables are removed from C code, give an error here!
00377857
EZ
372 (and native-p
373 (message "Note, built-in variable `%S' not bound" symbol))
4883633e
RS
374 ;; Save the standard value, unless we already did.
375 (or (get symbol 'standard-value)
a200d998 376 (put symbol 'standard-value (list standard)))
4883633e
RS
377 ;; If this is NOT while dumping Emacs,
378 ;; set up the rest of the customization info.
379 (unless purify-flag
380 ;; Add it to the right group.
381 (custom-add-to-group group symbol 'custom-variable)
382 ;; Set the type.
37328bcd
DL
383 (put symbol 'custom-type type)
384 (put symbol 'custom-version version)))))
4883633e 385
ecf5279a 386(custom-add-to-group 'iswitchb 'read-buffer-function 'custom-variable)
779d0b80
DL
387(custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start
388 'custom-variable)
e5f51929
DL
389(put 'selection-coding-system 'custom-set
390 (lambda (symbol value)
391 (set-selection-coding-system value)
392 (set symbol value)))
ecf5279a 393
4883633e
RS
394;; Record cus-start as loaded
395;; if we have set up all the info that we can set up.
396;; Don't record cus-start as loaded
397;; if we have set up only the standard values.
398(unless purify-flag
399 (provide 'cus-start))
1444b0c0 400
ab5796a9 401;;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60
1cd7adc6 402;;; cus-start.el ends here