Commit | Line | Data |
---|---|---|
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, \ | |
52 | the undo info for the current command never gets discarded. | |
53 | This should only be chosen under exceptional circumstances, | |
54 | since 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) |
37328bcd | 68 | (indicate-empty-lines display boolean "21.1") |
c6d57325 RS |
69 | (scroll-up-aggressively windows |
70 | (choice (const :tag "off" nil) number) | |
71 | "21.1") | |
72 | (scroll-down-aggressively windows | |
73 | (choice (const :tag "off" nil) number) | |
74 | "21.1") | |
1444b0c0 PA |
75 | ;; callint.c |
76 | (mark-even-if-inactive editing-basics boolean) | |
77 | ;; callproc.c | |
78 | (shell-file-name execute file) | |
79 | (exec-path execute | |
80 | (repeat (choice (const :tag "default" nil) | |
72e869ba | 81 | (directory :format "%v")))) |
5fc9eb7c DL |
82 | ;; coding.c |
83 | (inhibit-eol-conversion mule boolean) | |
de0d1fc5 EZ |
84 | (eol-mnemonic-undecided mule string) |
85 | (eol-mnemonic-unix mule string) | |
86 | (eol-mnemonic-dos mule string) | |
87 | (eol-mnemonic-mac mule string) | |
13eb63ff DL |
88 | (file-coding-system-alist |
89 | mule | |
90 | (alist | |
91 | :key-type (regexp :tag "File regexp") | |
92 | :value-type (choice | |
93 | :value (undecided . undecided) | |
94 | (cons :tag "Encoding/decoding pair" | |
95 | :value (undecided . undecided) | |
96 | (coding-system :tag "Decoding") | |
97 | (coding-system :tag "Encoding")) | |
98 | (coding-system :tag "Single coding system" | |
99 | :value undecided) | |
100 | (function :value ignore)))) | |
e5f51929 | 101 | (selection-coding-system mule coding-system) |
1444b0c0 | 102 | ;; dired.c |
71296446 | 103 | (completion-ignored-extensions dired |
1444b0c0 | 104 | (repeat (string :format "%v"))) |
0849a37e | 105 | ;; dispnew.c |
1444b0c0 PA |
106 | (baud-rate display integer) |
107 | (inverse-video display boolean) | |
108 | (visible-bell display boolean) | |
109 | (no-redraw-on-reenter display boolean) | |
110 | ;; editfns.c | |
111 | (user-full-name mail string) | |
112 | ;; eval.c | |
113 | (max-specpdl-size limits integer) | |
114 | (max-lisp-eval-depth limits integer) | |
115 | (stack-trace-on-error debug | |
116 | (choice (const :tag "off") | |
117 | (repeat :menu-tag "When" | |
118 | :value (nil) | |
119 | (symbol :format "%v")) | |
120 | (const :tag "always" t))) | |
71296446 | 121 | (debug-on-error debug |
1444b0c0 PA |
122 | (choice (const :tag "off") |
123 | (repeat :menu-tag "When" | |
124 | :value (nil) | |
125 | (symbol :format "%v")) | |
126 | (const :tag "always" t))) | |
127 | (debug-ignored-errors debug (repeat (choice symbol regexp))) | |
507c9247 RS |
128 | (debug-on-quit debug |
129 | (choice (const :tag "off") | |
130 | (repeat :menu-tag "When" | |
131 | :value (nil) | |
132 | (symbol :format "%v")) | |
133 | (const :tag "always" t))) | |
1444b0c0 PA |
134 | ;; fileio.c |
135 | (insert-default-directory minibuffer boolean) | |
bf247b6e | 136 | (read-file-name-completion-ignore-case minibuffer boolean "22.1") |
78976e0a | 137 | ;; fns.c |
37328bcd | 138 | (use-dialog-box menu boolean "21.1") |
bf247b6e | 139 | (use-file-dialog menu boolean "22.1") |
1444b0c0 PA |
140 | ;; frame.c |
141 | (default-frame-alist frames | |
142 | (repeat (cons :format "%v" | |
143 | (symbol :tag "Parameter") | |
144 | (sexp :tag "Value")))) | |
140fb7ff KS |
145 | (mouse-highlight mouse (choice (const :tag "disabled" nil) |
146 | (const :tag "always shown" t) | |
147 | (other :tag "hidden by keypress" 1))) | |
1444b0c0 PA |
148 | ;; indent.c |
149 | (indent-tabs-mode fill boolean) | |
150 | ;; keyboard.c | |
151 | (meta-prefix-char keyboard character) | |
152 | (auto-save-interval auto-save integer) | |
153 | (auto-save-timeout auto-save (choice (const :tag "off" nil) | |
154 | (integer :format "%v"))) | |
ac1b1728 | 155 | (echo-keystrokes minibuffer number) |
1444b0c0 | 156 | (polling-period keyboard integer) |
4db2b1c7 RS |
157 | (double-click-time mouse (restricted-sexp |
158 | :match-alternatives (integerp 'nil 't))) | |
3284b301 | 159 | (double-click-fuzz mouse integer) |
1444b0c0 PA |
160 | (inhibit-local-menu-bar-menus menu boolean) |
161 | (help-char keyboard character) | |
162 | (help-event-list keyboard (repeat (sexp :format "%v"))) | |
163 | (menu-prompting menu boolean) | |
1444b0c0 PA |
164 | (suggest-key-bindings keyboard (choice (const :tag "off" nil) |
165 | (integer :tag "time" 2) | |
79221864 | 166 | (other :tag "on"))) |
5f537e54 | 167 | |
37328bcd DL |
168 | ;; This is not good news because it will use the wrong |
169 | ;; version-specific directories when you upgrade. We need | |
170 | ;; customization of the front of the list, maintaining the standard | |
171 | ;; value intact at the back. | |
71296446 | 172 | ;;; (load-path environment |
37328bcd DL |
173 | ;;; (repeat (choice :tag "[Current dir?]" |
174 | ;;; :format "%[Current dir?%] %v" | |
175 | ;;; (const :tag " current dir" nil) | |
176 | ;;; (directory :format "%v")))) | |
1444b0c0 PA |
177 | ;; minibuf.c |
178 | (completion-auto-help minibuffer boolean) | |
179 | (enable-recursive-minibuffers minibuffer boolean) | |
408f56b2 RS |
180 | (history-length minibuffer |
181 | (choice (const :tag "Infinite" t) | |
182 | integer)) | |
1e64386e | 183 | (history-delete-duplicates minibuffer boolean) |
8f62f2b8 MB |
184 | (minibuffer-prompt-properties |
185 | minibuffer | |
186 | (list | |
187 | (checklist :inline t | |
188 | (const :tag "Read-Only" | |
189 | :doc "Prevent prompt from being modified" | |
190 | :format "%t%n%h" | |
191 | :inline t | |
192 | (read-only t)) | |
193 | (const :tag "Inviolable" | |
194 | :doc "Prevent point from ever entering prompt" | |
195 | :format "%t%n%h" | |
196 | :inline t | |
197 | (point-entered minibuffer-avoid-prompt))) | |
198 | (repeat :inline t | |
199 | :tag "Other Properties" | |
200 | (list :inline t | |
201 | :format "%v" | |
202 | (symbol :tag "Property") | |
ecf5279a DL |
203 | (sexp :tag "Value")))) |
204 | "21.1") | |
1444b0c0 | 205 | (minibuffer-auto-raise minibuffer boolean) |
ecf5279a | 206 | ;; options property set at end |
a8a1b05d DL |
207 | (read-buffer-function minibuffer |
208 | (choice (const nil) | |
209 | (function-item iswitchb-read-buffer) | |
210 | function)) | |
b78fba02 EZ |
211 | ;; msdos.c |
212 | (dos-unsupported-char-glyph display integer) | |
1444b0c0 | 213 | ;; process.c |
4883633e | 214 | (delete-exited-processes processes-basics boolean) |
1444b0c0 PA |
215 | ;; syntax.c |
216 | (parse-sexp-ignore-comments editing-basics boolean) | |
217 | (words-include-escapes editing-basics boolean) | |
779d0b80 DL |
218 | (open-paren-in-column-0-is-defun-start editing-basics boolean |
219 | "21.1") | |
1444b0c0 | 220 | ;; window.c |
4cb464b7 DL |
221 | (temp-buffer-show-function windows (choice (const nil) function)) |
222 | (display-buffer-function windows (choice (const nil) function)) | |
1444b0c0 PA |
223 | (pop-up-frames frames boolean) |
224 | (pop-up-frame-function frames function) | |
71296446 JB |
225 | (special-display-buffer-names |
226 | frames | |
1444b0c0 PA |
227 | (repeat (choice :tag "Buffer" |
228 | :value "" | |
229 | (string :format "%v") | |
230 | (cons :tag "With attributes" | |
231 | :format "%v" | |
232 | :value ("" . nil) | |
233 | (string :format "%v") | |
234 | (repeat :tag "Attributes" | |
235 | (cons :format "%v" | |
236 | (symbol :tag "Parameter") | |
237 | (sexp :tag "Value"))))))) | |
238 | (special-display-regexps | |
71296446 | 239 | frames |
1444b0c0 PA |
240 | (repeat (choice :tag "Buffer" |
241 | :value "" | |
242 | (regexp :format "%v") | |
243 | (cons :tag "With attributes" | |
244 | :format "%v" | |
245 | :value ("" . nil) | |
246 | (regexp :format "%v") | |
247 | (repeat :tag "Attributes" | |
248 | (cons :format "%v" | |
249 | (symbol :tag "Parameter") | |
250 | (sexp :tag "Value"))))))) | |
251 | (special-display-function frames function) | |
252 | (same-window-buffer-names windows (repeat (string :format "%v"))) | |
253 | (same-window-regexps windows (repeat (regexp :format "%v"))) | |
254 | (pop-up-windows windows boolean) | |
d2946490 | 255 | (even-window-heights windows boolean) |
74f54b54 | 256 | (next-screen-context-lines windows integer) |
1444b0c0 PA |
257 | (split-height-threshold windows integer) |
258 | (window-min-height windows integer) | |
259 | (window-min-width windows integer) | |
bcc67965 | 260 | (scroll-preserve-screen-position windows boolean) |
13eb63ff | 261 | (display-buffer-reuse-frames windows boolean "21.1") |
1444b0c0 PA |
262 | ;; xdisp.c |
263 | (scroll-step windows integer) | |
ccbb360e RS |
264 | (scroll-conservatively windows integer) |
265 | (scroll-margin windows integer) | |
8b75db34 EZ |
266 | (hscroll-margin windows integer "21.3") |
267 | (hscroll-step windows number "21.3") | |
1444b0c0 | 268 | (truncate-partial-width-windows display boolean) |
67ee1125 | 269 | (mode-line-inverse-video modeline boolean) |
ec544bdd | 270 | (mode-line-in-non-selected-windows modeline boolean "21.3") |
37328bcd DL |
271 | (line-number-display-limit display |
272 | (choice integer | |
273 | (const :tag "No limit" nil))) | |
779d0b80 | 274 | (line-number-display-limit-width display integer) |
1444b0c0 PA |
275 | (highlight-nonselected-windows display boolean) |
276 | (message-log-max debug (choice (const :tag "Disable" nil) | |
277 | (integer :menu-tag "lines" | |
278 | :format "%v") | |
79221864 | 279 | (other :tag "Unlimited" t))) |
daba3e25 | 280 | (unibyte-display-via-language-environment mule boolean) |
bf247b6e | 281 | (blink-cursor-alist cursor alist "22.1") |
e5f51929 DL |
282 | ;; xfaces.c |
283 | (scalable-fonts-allowed display boolean) | |
1444b0c0 PA |
284 | ;; xfns.c |
285 | (x-bitmap-file-path installation | |
0849a37e | 286 | (repeat (directory :format "%v"))) |
bf247b6e | 287 | (x-use-old-gtk-file-dialog menu boolean "22.1") |
0849a37e | 288 | ;; xterm.c |
e8d9157b | 289 | (mouse-autoselect-window display boolean "21.3") |
e369c773 | 290 | (x-use-underline-position-properties display boolean "21.3") |
37328bcd | 291 | (x-stretch-cursor display boolean "21.1"))) |
a200d998 | 292 | this symbol group type standard version native-p |
4883633e RS |
293 | ;; This function turns a value |
294 | ;; into an expression which produces that value. | |
295 | (quoter (lambda (sexp) | |
296 | (if (or (memq sexp '(t nil)) | |
017266f8 | 297 | (keywordp sexp) |
4883633e RS |
298 | (and (listp sexp) |
299 | (memq (car sexp) '(lambda))) | |
300 | (stringp sexp) | |
37328bcd | 301 | (numberp sexp)) |
4883633e RS |
302 | sexp |
303 | (list 'quote sexp))))) | |
71296446 | 304 | (while all |
1444b0c0 PA |
305 | (setq this (car all) |
306 | all (cdr all) | |
307 | symbol (nth 0 this) | |
308 | group (nth 1 this) | |
00377857 | 309 | type (nth 2 this) |
37328bcd | 310 | version (nth 3 this) |
a200d998 RS |
311 | ;; If we did not specify any standard value expression above, |
312 | ;; use the current value as the standard value. | |
313 | standard (if (nthcdr 4 this) | |
314 | (nth 4 this) | |
720f4c79 | 315 | (when (default-boundp symbol) |
92233e7e | 316 | (funcall quoter (default-value symbol)))) |
00377857 EZ |
317 | ;; Don't complain about missing variables which are |
318 | ;; irrelevant to this platform. | |
319 | native-p (save-match-data | |
320 | (cond | |
321 | ((string-match "\\`dos-" (symbol-name symbol)) | |
322 | (eq system-type 'ms-dos)) | |
323 | ((string-match "\\`w32-" (symbol-name symbol)) | |
324 | (eq system-type 'windows-nt)) | |
2702394e EZ |
325 | ((string-match "\\`x-.*gtk" (symbol-name symbol)) |
326 | (or (boundp 'gtk) (not (eq system-type 'windows-nt)))) | |
197a09bf EZ |
327 | ((string-match "\\`x-" (symbol-name symbol)) |
328 | (fboundp 'x-create-frame)) | |
00377857 | 329 | (t t)))) |
1444b0c0 PA |
330 | (if (not (boundp symbol)) |
331 | ;; If variables are removed from C code, give an error here! | |
00377857 EZ |
332 | (and native-p |
333 | (message "Note, built-in variable `%S' not bound" symbol)) | |
4883633e RS |
334 | ;; Save the standard value, unless we already did. |
335 | (or (get symbol 'standard-value) | |
a200d998 | 336 | (put symbol 'standard-value (list standard))) |
4883633e RS |
337 | ;; If this is NOT while dumping Emacs, |
338 | ;; set up the rest of the customization info. | |
339 | (unless purify-flag | |
340 | ;; Add it to the right group. | |
341 | (custom-add-to-group group symbol 'custom-variable) | |
342 | ;; Set the type. | |
37328bcd DL |
343 | (put symbol 'custom-type type) |
344 | (put symbol 'custom-version version))))) | |
4883633e | 345 | |
ecf5279a | 346 | (custom-add-to-group 'iswitchb 'read-buffer-function 'custom-variable) |
779d0b80 DL |
347 | (custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start |
348 | 'custom-variable) | |
e5f51929 DL |
349 | (put 'selection-coding-system 'custom-set |
350 | (lambda (symbol value) | |
351 | (set-selection-coding-system value) | |
352 | (set symbol value))) | |
ecf5279a | 353 | |
4883633e RS |
354 | ;; Record cus-start as loaded |
355 | ;; if we have set up all the info that we can set up. | |
356 | ;; Don't record cus-start as loaded | |
357 | ;; if we have set up only the standard values. | |
358 | (unless purify-flag | |
359 | (provide 'cus-start)) | |
1444b0c0 | 360 | |
ab5796a9 | 361 | ;;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60 |
1cd7adc6 | 362 | ;;; cus-start.el ends here |