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