Commit | Line | Data |
---|---|---|
1cd7adc6 | 1 | ;;; cus-start.el --- define customization properties of builtins |
1444b0c0 | 2 | ;; |
0d30b337 | 3 | ;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, |
114f9c96 | 4 | ;; 2005, 2006, 2007, 2008, 2009, 2010 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 | ||
eb3fa2cf | 11 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
c2383d2d | 12 | ;; it under the terms of the GNU General Public License as published by |
eb3fa2cf GM |
13 | ;; the Free Software Foundation, either version 3 of the License, or |
14 | ;; (at your option) any later version. | |
c2383d2d RS |
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 | |
eb3fa2cf | 22 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
c2383d2d | 23 | |
1444b0c0 PA |
24 | ;;; Commentary: |
25 | ;; | |
4883633e | 26 | ;; This file adds customize support for built-in variables. |
1444b0c0 | 27 | |
4883633e RS |
28 | ;; While dumping Emacs, this file is loaded, but it only records |
29 | ;; the standard values; it does not do the rest of the job. | |
30 | ;; Later on, if the user makes a customization buffer, | |
31 | ;; this file is loaded again with (require 'cus-start); | |
32 | ;; then it does the whole job. | |
1444b0c0 | 33 | |
4883633e | 34 | ;;; Code: |
1444b0c0 | 35 | |
e047f448 | 36 | (let ((all '(;; alloc.c |
1444b0c0 | 37 | (gc-cons-threshold alloc integer) |
0f014aa1 | 38 | (garbage-collection-messages alloc boolean) |
1444b0c0 | 39 | ;; buffer.c |
e45db0fb | 40 | (mode-line-format mode-line sexp) ;Hard to do right. |
4e3b4528 | 41 | (major-mode internal function) |
1444b0c0 PA |
42 | (case-fold-search matching boolean) |
43 | (fill-column fill integer) | |
44 | (left-margin fill integer) | |
45 | (tab-width editing-basics integer) | |
46 | (ctl-arrow display boolean) | |
47 | (truncate-lines display boolean) | |
84975bbe | 48 | (word-wrap display boolean) |
1444b0c0 | 49 | (selective-display-ellipses display boolean) |
516b77a3 | 50 | (indicate-empty-lines fringe boolean) |
eb94dac6 LT |
51 | (indicate-buffer-boundaries |
52 | fringe | |
53 | (choice | |
54 | (const :tag "No indicators" nil) | |
55 | (const :tag "On left, with arrows" left) | |
56 | (const :tag "On right, with arrows" right) | |
a4fbb790 LT |
57 | (set :tag "Pick your own design" |
58 | :value ((t . nil)) | |
59 | :format "%{%t%}:\n%v\n%d" | |
60 | :doc "You can specify a default and then override it \ | |
61 | for individual indicators. | |
62 | Leaving \"Default\" unchecked is equivalent with specifying a default of | |
63 | \"Do not show\"." | |
64 | (choice :tag "Default" | |
65 | :value (t . nil) | |
66 | (const :tag "Do not show" (t . nil)) | |
67 | (const :tag "On the left" (t . left)) | |
68 | (const :tag "On the right" (t . right))) | |
69 | (choice :tag "Top" | |
70 | :value (top . left) | |
71 | (const :tag "Do not show" (top . nil)) | |
72 | (const :tag "On the left" (top . left)) | |
73 | (const :tag "On the right" (top . right))) | |
74 | (choice :tag "Bottom" | |
75 | :value (bottom . left) | |
76 | (const :tag "Do not show" (bottom . nil)) | |
77 | (const :tag "On the left" (bottom . left)) | |
78 | (const :tag "On the right" (bottom . right))) | |
79 | (choice :tag "Up arrow" | |
80 | :value (up . left) | |
81 | (const :tag "Do not show" (up . nil)) | |
82 | (const :tag "On the left" (up . left)) | |
83 | (const :tag "On the right" (up . right))) | |
84 | (choice :tag "Down arrow" | |
85 | :value (down . left) | |
86 | (const :tag "Do not show" (down . nil)) | |
87 | (const :tag "On the left" (down . left)) | |
88 | (const :tag "On the right" (down . right)))) | |
516b77a3 | 89 | (other :tag "On left, no arrows" t))) |
c6d57325 RS |
90 | (scroll-up-aggressively windows |
91 | (choice (const :tag "off" nil) number) | |
92 | "21.1") | |
93 | (scroll-down-aggressively windows | |
94 | (choice (const :tag "off" nil) number) | |
95 | "21.1") | |
6671cab3 MR |
96 | (line-spacing display (choice (const :tag "none" nil) integer) |
97 | "22.1") | |
1444b0c0 PA |
98 | ;; callint.c |
99 | (mark-even-if-inactive editing-basics boolean) | |
100 | ;; callproc.c | |
101 | (shell-file-name execute file) | |
102 | (exec-path execute | |
f747a488 | 103 | (repeat (choice (const :tag "default directory" nil) |
72e869ba | 104 | (directory :format "%v")))) |
5e3097cd | 105 | ;; charset.c |
c11f69e1 KH |
106 | (charset-map-path installation |
107 | (repeat (directory :format "%v"))) | |
5fc9eb7c DL |
108 | ;; coding.c |
109 | (inhibit-eol-conversion mule boolean) | |
de0d1fc5 EZ |
110 | (eol-mnemonic-undecided mule string) |
111 | (eol-mnemonic-unix mule string) | |
112 | (eol-mnemonic-dos mule string) | |
113 | (eol-mnemonic-mac mule string) | |
13eb63ff DL |
114 | (file-coding-system-alist |
115 | mule | |
116 | (alist | |
117 | :key-type (regexp :tag "File regexp") | |
118 | :value-type (choice | |
119 | :value (undecided . undecided) | |
120 | (cons :tag "Encoding/decoding pair" | |
121 | :value (undecided . undecided) | |
122 | (coding-system :tag "Decoding") | |
123 | (coding-system :tag "Encoding")) | |
70c2811c KY |
124 | (coding-system |
125 | :tag "Single coding system" | |
126 | :value undecided | |
127 | :match (lambda (widget value) | |
128 | (and value (not (functionp value))))) | |
13eb63ff | 129 | (function :value ignore)))) |
1444b0c0 | 130 | ;; dired.c |
71296446 | 131 | (completion-ignored-extensions dired |
1444b0c0 | 132 | (repeat (string :format "%v"))) |
0849a37e | 133 | ;; dispnew.c |
1444b0c0 PA |
134 | (baud-rate display integer) |
135 | (inverse-video display boolean) | |
136 | (visible-bell display boolean) | |
137 | (no-redraw-on-reenter display boolean) | |
138 | ;; editfns.c | |
139 | (user-full-name mail string) | |
140 | ;; eval.c | |
141 | (max-specpdl-size limits integer) | |
142 | (max-lisp-eval-depth limits integer) | |
f8add097 RS |
143 | (max-mini-window-height limits |
144 | (choice (const :tag "quarter screen" nil) | |
6671cab3 | 145 | number) "23.1") |
1444b0c0 PA |
146 | (stack-trace-on-error debug |
147 | (choice (const :tag "off") | |
148 | (repeat :menu-tag "When" | |
149 | :value (nil) | |
150 | (symbol :format "%v")) | |
151 | (const :tag "always" t))) | |
71296446 | 152 | (debug-on-error debug |
1444b0c0 PA |
153 | (choice (const :tag "off") |
154 | (repeat :menu-tag "When" | |
155 | :value (nil) | |
156 | (symbol :format "%v")) | |
157 | (const :tag "always" t))) | |
158 | (debug-ignored-errors debug (repeat (choice symbol regexp))) | |
507c9247 RS |
159 | (debug-on-quit debug |
160 | (choice (const :tag "off") | |
161 | (repeat :menu-tag "When" | |
162 | :value (nil) | |
163 | (symbol :format "%v")) | |
164 | (const :tag "always" t))) | |
6cf29fe8 JR |
165 | ;; fileio.c |
166 | (delete-by-moving-to-trash auto-save boolean "23.1") | |
6ba7a6f0 | 167 | (auto-save-visited-file-name auto-save boolean) |
78976e0a | 168 | ;; fns.c |
37328bcd | 169 | (use-dialog-box menu boolean "21.1") |
bf247b6e | 170 | (use-file-dialog menu boolean "22.1") |
f4c307a5 | 171 | (focus-follows-mouse frames boolean "20.3") |
1444b0c0 PA |
172 | ;; frame.c |
173 | (default-frame-alist frames | |
174 | (repeat (cons :format "%v" | |
175 | (symbol :tag "Parameter") | |
176 | (sexp :tag "Value")))) | |
140fb7ff KS |
177 | (mouse-highlight mouse (choice (const :tag "disabled" nil) |
178 | (const :tag "always shown" t) | |
6671cab3 MR |
179 | (other :tag "hidden by keypress" 1)) |
180 | "22.1") | |
e044e4fc | 181 | (make-pointer-invisible mouse boolean "23.2") |
48d707c5 | 182 | ;; fringe.c |
516b77a3 | 183 | (overflow-newline-into-fringe fringe boolean) |
1444b0c0 | 184 | ;; indent.c |
01892a52 | 185 | (indent-tabs-mode indent boolean) |
1444b0c0 PA |
186 | ;; keyboard.c |
187 | (meta-prefix-char keyboard character) | |
188 | (auto-save-interval auto-save integer) | |
189 | (auto-save-timeout auto-save (choice (const :tag "off" nil) | |
190 | (integer :format "%v"))) | |
ac1b1728 | 191 | (echo-keystrokes minibuffer number) |
1444b0c0 | 192 | (polling-period keyboard integer) |
4db2b1c7 RS |
193 | (double-click-time mouse (restricted-sexp |
194 | :match-alternatives (integerp 'nil 't))) | |
6671cab3 | 195 | (double-click-fuzz mouse integer "22.1") |
1444b0c0 PA |
196 | (inhibit-local-menu-bar-menus menu boolean) |
197 | (help-char keyboard character) | |
198 | (help-event-list keyboard (repeat (sexp :format "%v"))) | |
199 | (menu-prompting menu boolean) | |
1444b0c0 PA |
200 | (suggest-key-bindings keyboard (choice (const :tag "off" nil) |
201 | (integer :tag "time" 2) | |
79221864 | 202 | (other :tag "on"))) |
5f537e54 | 203 | |
37328bcd DL |
204 | ;; This is not good news because it will use the wrong |
205 | ;; version-specific directories when you upgrade. We need | |
206 | ;; customization of the front of the list, maintaining the standard | |
207 | ;; value intact at the back. | |
71296446 | 208 | ;;; (load-path environment |
37328bcd DL |
209 | ;;; (repeat (choice :tag "[Current dir?]" |
210 | ;;; :format "%[Current dir?%] %v" | |
211 | ;;; (const :tag " current dir" nil) | |
212 | ;;; (directory :format "%v")))) | |
1444b0c0 | 213 | ;; minibuf.c |
1444b0c0 | 214 | (enable-recursive-minibuffers minibuffer boolean) |
408f56b2 | 215 | (history-length minibuffer |
6671cab3 MR |
216 | (choice (const :tag "Infinite" t) integer) |
217 | "22.1") | |
218 | (history-delete-duplicates minibuffer boolean "22.1") | |
ed278e5d CY |
219 | (read-buffer-completion-ignore-case minibuffer boolean "23.1") |
220 | ||
8f62f2b8 MB |
221 | (minibuffer-prompt-properties |
222 | minibuffer | |
223 | (list | |
224 | (checklist :inline t | |
225 | (const :tag "Read-Only" | |
226 | :doc "Prevent prompt from being modified" | |
227 | :format "%t%n%h" | |
228 | :inline t | |
229 | (read-only t)) | |
c9133fa6 | 230 | (const :tag "Don't Enter" |
8f62f2b8 MB |
231 | :doc "Prevent point from ever entering prompt" |
232 | :format "%t%n%h" | |
233 | :inline t | |
234 | (point-entered minibuffer-avoid-prompt))) | |
235 | (repeat :inline t | |
236 | :tag "Other Properties" | |
237 | (list :inline t | |
238 | :format "%v" | |
239 | (symbol :tag "Property") | |
ecf5279a DL |
240 | (sexp :tag "Value")))) |
241 | "21.1") | |
1444b0c0 | 242 | (minibuffer-auto-raise minibuffer boolean) |
ecf5279a | 243 | ;; options property set at end |
a8a1b05d DL |
244 | (read-buffer-function minibuffer |
245 | (choice (const nil) | |
246 | (function-item iswitchb-read-buffer) | |
247 | function)) | |
b78fba02 EZ |
248 | ;; msdos.c |
249 | (dos-unsupported-char-glyph display integer) | |
bc9ebf41 | 250 | ;; nsterm.m |
77346ecd | 251 | (ns-control-modifier |
ae2349fe | 252 | ns |
bc9ebf41 DR |
253 | (choice (const :tag "No modifier" nil) |
254 | (const control) (const meta) | |
255 | (const alt) (const hyper) | |
256 | (const super)) "23.1") | |
77346ecd | 257 | (ns-command-modifier |
ae2349fe | 258 | ns |
bc9ebf41 DR |
259 | (choice (const :tag "No modifier" nil) |
260 | (const control) (const meta) | |
261 | (const alt) (const hyper) | |
262 | (const super)) "23.1") | |
77346ecd | 263 | (ns-alternate-modifier |
ae2349fe | 264 | ns |
bc9ebf41 DR |
265 | (choice (const :tag "No modifier (work as alternate/option)" none) |
266 | (const control) (const meta) | |
267 | (const alt) (const hyper) | |
268 | (const super)) "23.1") | |
77346ecd | 269 | (ns-function-modifier |
ae2349fe | 270 | ns |
bc9ebf41 DR |
271 | (choice (const :tag "No modifier (work as function)" none) |
272 | (const control) (const meta) | |
273 | (const alt) (const hyper) | |
274 | (const super)) "23.1") | |
275 | (ns-antialias-text ns boolean "23.1") | |
1444b0c0 | 276 | ;; process.c |
4883633e | 277 | (delete-exited-processes processes-basics boolean) |
1444b0c0 PA |
278 | ;; syntax.c |
279 | (parse-sexp-ignore-comments editing-basics boolean) | |
280 | (words-include-escapes editing-basics boolean) | |
6b61353c KH |
281 | (open-paren-in-column-0-is-defun-start editing-basics boolean |
282 | "21.1") | |
98e071b5 SM |
283 | ;; term.c |
284 | (visible-cursor cursor boolean "22.1") | |
0f08b956 LT |
285 | ;; undo.c |
286 | (undo-limit undo integer) | |
287 | (undo-strong-limit undo integer) | |
288 | (undo-outer-limit undo | |
289 | (choice integer | |
290 | (const :tag "No limit" | |
291 | :format "%t\n%d" | |
292 | :doc | |
293 | "With this choice, \ | |
294 | the undo info for the current command never gets discarded. | |
295 | This should only be chosen under exceptional circumstances, | |
296 | since it could result in memory overflow and make Emacs crash." | |
297 | nil)) | |
298 | "22.1") | |
1444b0c0 | 299 | ;; window.c |
4cb464b7 | 300 | (temp-buffer-show-function windows (choice (const nil) function)) |
74f54b54 | 301 | (next-screen-context-lines windows integer) |
1444b0c0 PA |
302 | (window-min-height windows integer) |
303 | (window-min-width windows integer) | |
7704b6b1 KS |
304 | (scroll-preserve-screen-position |
305 | windows (choice | |
306 | (const :tag "Off (nil)" :value nil) | |
307 | (const :tag "Full screen (t)" :value t) | |
6671cab3 | 308 | (other :tag "Always" 1)) "22.1") |
666e158e MB |
309 | (recenter-redisplay windows |
310 | (choice | |
311 | (const :tag "Never (nil)" :value nil) | |
312 | (const :tag "Only on ttys" :value tty) | |
313 | (other :tag "Always" t)) | |
314 | "23.1") | |
1444b0c0 PA |
315 | ;; xdisp.c |
316 | (scroll-step windows integer) | |
ccbb360e RS |
317 | (scroll-conservatively windows integer) |
318 | (scroll-margin windows integer) | |
4e371ce8 EZ |
319 | (hscroll-margin windows integer "22.1") |
320 | (hscroll-step windows number "22.1") | |
3a66cc91 | 321 | (truncate-partial-width-windows display boolean "23.1") |
e45db0fb MR |
322 | (mode-line-inverse-video mode-line boolean) |
323 | (mode-line-in-non-selected-windows mode-line boolean "22.1") | |
37328bcd DL |
324 | (line-number-display-limit display |
325 | (choice integer | |
326 | (const :tag "No limit" nil))) | |
6671cab3 | 327 | (line-number-display-limit-width display integer "22.1") |
1444b0c0 PA |
328 | (highlight-nonselected-windows display boolean) |
329 | (message-log-max debug (choice (const :tag "Disable" nil) | |
330 | (integer :menu-tag "lines" | |
331 | :format "%v") | |
79221864 | 332 | (other :tag "Unlimited" t))) |
daba3e25 | 333 | (unibyte-display-via-language-environment mule boolean) |
bf247b6e | 334 | (blink-cursor-alist cursor alist "22.1") |
03c25271 | 335 | (overline-margin display integer "22.1") |
2a3bd2e1 | 336 | (underline-minimum-offset display integer "23.1") |
612c16f1 CY |
337 | (mouse-autoselect-window |
338 | display (choice | |
339 | (const :tag "Off (nil)" :value nil) | |
340 | (const :tag "Immediate" :value t) | |
341 | (number :tag "Delay by secs" :value 0.5)) "22.1") | |
f904c0f9 JD |
342 | (tool-bar-style |
343 | frames (choice | |
344 | (const :tag "Images" :value image) | |
345 | (const :tag "Text" :value text) | |
346 | (const :tag "Both" :value both) | |
347 | (const :tag "Both-horiz" :value both-horiz) | |
8a52f00a | 348 | (const :tag "Text-image-horiz" :value text-image-horiz) |
f904c0f9 JD |
349 | (const :tag "System default" :value nil)) "23.3") |
350 | (tool-bar-max-label-size frames integer "23.3") | |
351 | ||
e5f51929 | 352 | ;; xfaces.c |
6671cab3 | 353 | (scalable-fonts-allowed display boolean "22.1") |
1444b0c0 PA |
354 | ;; xfns.c |
355 | (x-bitmap-file-path installation | |
0849a37e | 356 | (repeat (directory :format "%v"))) |
c4823934 | 357 | (x-gtk-use-old-file-dialog menu boolean "22.1") |
91b5a204 | 358 | (x-gtk-show-hidden-files menu boolean "22.1") |
c4823934 | 359 | (x-gtk-file-dialog-help-text menu boolean "22.1") |
0dd95b49 | 360 | (x-gtk-whole-detached-tool-bar x boolean "22.1") |
aa1859f5 | 361 | (x-gtk-use-system-tooltips tooltip boolean "23.3") |
0849a37e | 362 | ;; xterm.c |
4e371ce8 | 363 | (x-use-underline-position-properties display boolean "22.1") |
03c25271 | 364 | (x-underline-at-descent-line display boolean "22.1") |
dfb3c4c6 JD |
365 | (x-stretch-cursor display boolean "21.1") |
366 | ;; xsettings.c | |
367 | (font-use-system-font font-selection boolean "23.2"))) | |
a200d998 | 368 | this symbol group type standard version native-p |
4883633e RS |
369 | ;; This function turns a value |
370 | ;; into an expression which produces that value. | |
371 | (quoter (lambda (sexp) | |
372 | (if (or (memq sexp '(t nil)) | |
017266f8 | 373 | (keywordp sexp) |
4883633e RS |
374 | (and (listp sexp) |
375 | (memq (car sexp) '(lambda))) | |
376 | (stringp sexp) | |
37328bcd | 377 | (numberp sexp)) |
4883633e RS |
378 | sexp |
379 | (list 'quote sexp))))) | |
71296446 | 380 | (while all |
1444b0c0 PA |
381 | (setq this (car all) |
382 | all (cdr all) | |
383 | symbol (nth 0 this) | |
384 | group (nth 1 this) | |
00377857 | 385 | type (nth 2 this) |
37328bcd | 386 | version (nth 3 this) |
a200d998 RS |
387 | ;; If we did not specify any standard value expression above, |
388 | ;; use the current value as the standard value. | |
389 | standard (if (nthcdr 4 this) | |
390 | (nth 4 this) | |
720f4c79 | 391 | (when (default-boundp symbol) |
92233e7e | 392 | (funcall quoter (default-value symbol)))) |
00377857 EZ |
393 | ;; Don't complain about missing variables which are |
394 | ;; irrelevant to this platform. | |
395 | native-p (save-match-data | |
396 | (cond | |
397 | ((string-match "\\`dos-" (symbol-name symbol)) | |
398 | (eq system-type 'ms-dos)) | |
399 | ((string-match "\\`w32-" (symbol-name symbol)) | |
400 | (eq system-type 'windows-nt)) | |
77346ecd EZ |
401 | ((string-match "\\`ns-" (symbol-name symbol)) |
402 | (featurep 'ns)) | |
2702394e | 403 | ((string-match "\\`x-.*gtk" (symbol-name symbol)) |
79cf2123 | 404 | (featurep 'gtk)) |
197a09bf EZ |
405 | ((string-match "\\`x-" (symbol-name symbol)) |
406 | (fboundp 'x-create-frame)) | |
6eb33acb EZ |
407 | ((string-match "selection" (symbol-name symbol)) |
408 | (fboundp 'x-selection-exists-p)) | |
409 | ((string-match "fringe" (symbol-name symbol)) | |
410 | (fboundp 'define-fringe-bitmap)) | |
8b571bf3 JD |
411 | ((equal "font-use-system-font" (symbol-name symbol)) |
412 | (featurep 'system-font-setting)) | |
c0162ade EZ |
413 | ;; Conditioned on x-create-frame, because that's |
414 | ;; the condition for loadup.el to preload tool-bar.el. | |
415 | ((string-match "tool-bar-" (symbol-name symbol)) | |
416 | (fboundp 'x-create-frame)) | |
00377857 | 417 | (t t)))) |
1444b0c0 PA |
418 | (if (not (boundp symbol)) |
419 | ;; If variables are removed from C code, give an error here! | |
00377857 EZ |
420 | (and native-p |
421 | (message "Note, built-in variable `%S' not bound" symbol)) | |
4883633e RS |
422 | ;; Save the standard value, unless we already did. |
423 | (or (get symbol 'standard-value) | |
a200d998 | 424 | (put symbol 'standard-value (list standard))) |
4883633e RS |
425 | ;; If this is NOT while dumping Emacs, |
426 | ;; set up the rest of the customization info. | |
427 | (unless purify-flag | |
428 | ;; Add it to the right group. | |
429 | (custom-add-to-group group symbol 'custom-variable) | |
430 | ;; Set the type. | |
37328bcd DL |
431 | (put symbol 'custom-type type) |
432 | (put symbol 'custom-version version))))) | |
4883633e | 433 | |
ecf5279a | 434 | (custom-add-to-group 'iswitchb 'read-buffer-function 'custom-variable) |
6b61353c KH |
435 | (custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start |
436 | 'custom-variable) | |
ecf5279a | 437 | |
4883633e RS |
438 | ;; Record cus-start as loaded |
439 | ;; if we have set up all the info that we can set up. | |
440 | ;; Don't record cus-start as loaded | |
441 | ;; if we have set up only the standard values. | |
442 | (unless purify-flag | |
443 | (provide 'cus-start)) | |
1444b0c0 | 444 | |
c8f1ea76 | 445 | ;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60 |
1cd7adc6 | 446 | ;;; cus-start.el ends here |