]> code.delx.au - gnu-emacs/blob - lisp/cus-start.el
Update docs for `customize-mode'
[gnu-emacs] / lisp / cus-start.el
1 ;;; cus-start.el --- define customization properties of builtins -*- lexical-binding:t -*-
2
3 ;; Copyright (C) 1997, 1999-2016 Free Software Foundation, Inc.
4
5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
6 ;; Keywords: internal
7 ;; Package: emacs
8
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 3 of the License, or
14 ;; (at your option) 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. If not, see <http://www.gnu.org/licenses/>.
23
24 ;;; Commentary:
25
26 ;; This file adds customize support for built-in variables.
27
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.
33
34 ;;; Code:
35
36 (defun minibuffer-prompt-properties--setter (symbol value)
37 (set-default symbol value)
38 (if (memq 'cursor-intangible value)
39 (add-hook 'minibuffer-setup-hook 'cursor-intangible-mode)
40 ;; Removing it is a bit trickier since it could have been added by someone
41 ;; else as well, so let's just not bother.
42 ))
43
44 ;; Elements of this list have the form:
45 ;; SYMBOL GROUP TYPE VERSION REST...
46 ;; SYMBOL is the name of the variable.
47 ;; GROUP is the custom group to which it belongs (may also be a list
48 ;; of groups)
49 ;; TYPE is the defcustom :type.
50 ;; VERSION is the defcustom :version (or nil).
51 ;; REST is a set of :KEYWORD VALUE pairs. Accepted :KEYWORDs are:
52 ;; :standard - standard value for SYMBOL (else use current value)
53 ;; :set - custom-set property
54 ;; :risky - risky-local-variable property
55 ;; :safe - safe-local-variable property
56 ;; :tag - custom-tag property
57 (let (standard
58 native-p prop propval
59 ;; This function turns a value
60 ;; into an expression which produces that value.
61 (quoter (lambda (sexp)
62 ;; FIXME: We'd like to use macroexp-quote here, but cus-start
63 ;; is loaded too early in loadup.el for that.
64 (if (or (memq sexp '(t nil))
65 (keywordp sexp)
66 (and (listp sexp)
67 (memq (car sexp) '(lambda)))
68 (stringp sexp)
69 (numberp sexp))
70 sexp
71 (list 'quote sexp))))
72 (cursor-type-types
73 '(choice
74 (const :tag "Frame default" t)
75 (const :tag "Filled box" box)
76 (const :tag "Hollow cursor" hollow)
77 (const :tag "Vertical bar" bar)
78 (cons :tag "Vertical bar with specified width"
79 (const bar) integer)
80 (const :tag "Horizontal bar" hbar)
81 (cons :tag "Horizontal bar with specified width"
82 (const hbar) integer)
83 (const :tag "None "nil))))
84 (pcase-dolist
85 (`(,symbol ,group ,type ,version . ,rest)
86 `(;; alloc.c
87 (gc-cons-threshold alloc integer)
88 (gc-cons-percentage alloc float)
89 (garbage-collection-messages alloc boolean)
90 ;; buffer.c
91 (cursor-type display ,cursor-type-types)
92 (mode-line-format mode-line sexp) ;Hard to do right.
93 (major-mode internal function)
94 (case-fold-search matching boolean)
95 (fill-column fill integer)
96 (left-margin fill integer)
97 (tab-width editing-basics integer)
98 (ctl-arrow display boolean)
99 (truncate-lines display boolean)
100 (word-wrap display boolean)
101 (selective-display-ellipses display boolean)
102 (indicate-empty-lines fringe boolean)
103 (indicate-buffer-boundaries
104 fringe
105 (choice
106 (const :tag "No indicators" nil)
107 (const :tag "On left, with arrows" left)
108 (const :tag "On right, with arrows" right)
109 (set :tag "Pick your own design"
110 :value ((t . nil))
111 :format "%{%t%}:\n%v\n%d"
112 :doc "You can specify a default and then override it \
113 for individual indicators.
114 Leaving \"Default\" unchecked is equivalent with specifying a default of
115 \"Do not show\"."
116 (choice :tag "Default"
117 :value (t . nil)
118 (const :tag "Do not show" (t . nil))
119 (const :tag "On the left" (t . left))
120 (const :tag "On the right" (t . right)))
121 (choice :tag "Top"
122 :value (top . left)
123 (const :tag "Do not show" (top . nil))
124 (const :tag "On the left" (top . left))
125 (const :tag "On the right" (top . right)))
126 (choice :tag "Bottom"
127 :value (bottom . left)
128 (const :tag "Do not show" (bottom . nil))
129 (const :tag "On the left" (bottom . left))
130 (const :tag "On the right" (bottom . right)))
131 (choice :tag "Up arrow"
132 :value (up . left)
133 (const :tag "Do not show" (up . nil))
134 (const :tag "On the left" (up . left))
135 (const :tag "On the right" (up . right)))
136 (choice :tag "Down arrow"
137 :value (down . left)
138 (const :tag "Do not show" (down . nil))
139 (const :tag "On the left" (down . left))
140 (const :tag "On the right" (down . right))))
141 (other :tag "On left, no arrows" t)))
142 (scroll-up-aggressively windows
143 (choice (const :tag "off" nil) float)
144 "21.1")
145 (scroll-down-aggressively windows
146 (choice (const :tag "off" nil) float)
147 "21.1")
148 (line-spacing display (choice (const :tag "none" nil) number)
149 "22.1")
150 (cursor-in-non-selected-windows
151 cursor ,cursor-type-types nil
152 :tag "Cursor In Non-selected Windows"
153 :set (lambda (symbol value)
154 (set-default symbol value)
155 (force-mode-line-update t)))
156 (transient-mark-mode editing-basics boolean nil
157 :standard (not noninteractive)
158 :initialize custom-initialize-delay
159 :set custom-set-minor-mode)
160 (bidi-paragraph-direction
161 paragraphs
162 (choice
163 (const :tag "Left to Right" left-to-right)
164 (const :tag "Right to Left" right-to-left)
165 (const :tag "Dynamic, according to paragraph text" nil))
166 "24.1")
167 ;; callint.c
168 (mark-even-if-inactive editing-basics boolean)
169 ;; callproc.c
170 (shell-file-name execute file)
171 (exec-path execute
172 (repeat (choice (const :tag "default directory" nil)
173 (directory :format "%v")))
174 nil
175 :standard
176 (mapcar 'directory-file-name
177 (append (parse-colon-path (getenv "PATH"))
178 (list exec-directory))))
179 (exec-suffixes execute (repeat string))
180 ;; charset.c
181 (charset-map-path installation
182 (repeat (directory :format "%v")))
183 ;; coding.c
184 (inhibit-eol-conversion mule boolean)
185 (enable-character-translation mule boolean)
186 (eol-mnemonic-undecided mule string)
187 ;; startup.el fiddles with the values. IMO, would be
188 ;; simpler to just use #ifdefs in coding.c.
189 (eol-mnemonic-unix mule string nil
190 :standard
191 (if (memq system-type '(ms-dos windows-nt))
192 "(Unix)" ":"))
193 (eol-mnemonic-dos mule string nil
194 :standard
195 (if (memq system-type '(ms-dos windows-nt))
196 "\\" "(DOS)"))
197 (eol-mnemonic-mac mule string nil
198 :standard "(Mac)")
199 (file-coding-system-alist
200 mule
201 (alist
202 :key-type (regexp :tag "File regexp")
203 :value-type (choice
204 :value (undecided . undecided)
205 (cons :tag "Encoding/decoding pair"
206 :value (undecided . undecided)
207 (coding-system :tag "Decoding")
208 (coding-system :tag "Encoding"))
209 (coding-system
210 :tag "Single coding system"
211 :value undecided
212 :match (lambda (widget value)
213 (and value (not (functionp value)))))
214 (function :value ignore))))
215 ;; dired.c
216 (completion-ignored-extensions dired
217 (repeat (string :format "%v")))
218 ;; dispnew.c
219 (baud-rate display integer)
220 (inverse-video display boolean)
221 (visible-bell display boolean)
222 (no-redraw-on-reenter display boolean)
223
224 ;; dosfns.c
225 (dos-display-scancodes display boolean)
226 (dos-hyper-key keyboard integer)
227 (dos-super-key keyboard integer)
228 (dos-keypad-mode keyboard integer)
229
230 ;; editfns.c
231 (user-full-name mail string)
232 ;; emacs.c
233 (report-emacs-bug-address emacsbug string)
234 ;; eval.c
235 (max-specpdl-size limits integer)
236 (max-lisp-eval-depth limits integer)
237 (max-mini-window-height limits
238 (choice (const :tag "quarter screen" nil)
239 number) "23.1")
240 (debug-on-error debug
241 (choice (const :tag "off")
242 (repeat :menu-tag "When"
243 :value (nil)
244 (symbol :format "%v"))
245 (const :tag "always" t)))
246 (debug-ignored-errors debug (repeat (choice symbol regexp)))
247 (debug-on-quit debug boolean)
248 (debug-on-signal debug boolean)
249 ;; fileio.c
250 (delete-by-moving-to-trash auto-save boolean "23.1")
251 (auto-save-visited-file-name auto-save boolean)
252 ;; filelock.c
253 (create-lockfiles files boolean "24.3")
254 (temporary-file-directory
255 ;; Darwin section added 24.1, does not seem worth :version bump.
256 files directory nil
257 :standard
258 (file-name-as-directory
259 ;; FIXME ? Should there be Ftemporary_file_directory to do this
260 ;; more robustly (cf set_local_socket in emacsclient.c).
261 ;; It could be used elsewhere, eg Fcall_process_region,
262 ;; server-socket-dir. See bug#7135.
263 (cond ((memq system-type '(ms-dos windows-nt))
264 (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP")
265 "c:/temp"))
266 ((eq system-type 'darwin)
267 (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
268 ;; See bug#7135.
269 (let ((tmp (ignore-errors
270 (shell-command-to-string
271 "getconf DARWIN_USER_TEMP_DIR"))))
272 (and (stringp tmp)
273 (setq tmp (replace-regexp-in-string
274 "\n\\'" "" tmp))
275 ;; Handles "getconf: Unrecognized variable..."
276 (file-directory-p tmp)
277 tmp))
278 "/tmp"))
279 (t
280 (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
281 "/tmp"))))
282 :initialize custom-initialize-delay)
283 ;; fns.c
284 (use-dialog-box menu boolean "21.1")
285 (use-file-dialog menu boolean "22.1")
286 (focus-follows-mouse frames boolean "20.3")
287 ;; fontset.c
288 ;; FIXME nil is the initial value, fontset.el setqs it.
289 (vertical-centering-font-regexp display
290 (choice (const nil) regexp))
291 ;; frame.c
292 (default-frame-alist frames
293 (repeat (cons :format "%v"
294 (symbol :tag "Parameter")
295 (sexp :tag "Value"))))
296 (mouse-highlight mouse (choice (const :tag "disabled" nil)
297 (const :tag "always shown" t)
298 (other :tag "hidden by keypress" 1))
299 "22.1")
300 (make-pointer-invisible mouse boolean "23.2")
301 (menu-bar-mode frames boolean nil
302 ;; FIXME?
303 ;; :initialize custom-initialize-default
304 :set custom-set-minor-mode)
305 (tool-bar-mode (frames mouse) boolean nil
306 ;; :initialize custom-initialize-default
307 :set custom-set-minor-mode)
308 (frame-resize-pixelwise frames boolean "24.4")
309 (frame-inhibit-implied-resize frames
310 (choice
311 (const :tag "Never" nil)
312 (const :tag "Always" t)
313 (repeat (symbol :tag "Parameter")))
314 "25.1")
315 ;; fringe.c
316 (overflow-newline-into-fringe fringe boolean)
317 ;; image.c
318 (imagemagick-render-type image integer "24.1")
319 ;; indent.c
320 (indent-tabs-mode indent boolean)
321 ;; keyboard.c
322 (meta-prefix-char keyboard character)
323 (auto-save-interval auto-save integer)
324 (auto-save-timeout auto-save (choice (const :tag "off" nil)
325 (integer :format "%v")))
326 (echo-keystrokes minibuffer number)
327 (polling-period keyboard integer)
328 (double-click-time mouse (restricted-sexp
329 :match-alternatives (integerp 'nil 't)))
330 (double-click-fuzz mouse integer "22.1")
331 (help-char keyboard character)
332 (help-event-list keyboard (repeat (sexp :format "%v")))
333 (menu-prompting menu boolean)
334 (select-active-regions killing
335 (choice (const :tag "always" t)
336 (const :tag "only shift-selection or mouse-drag" only)
337 (const :tag "off" nil))
338 "24.1")
339 (debug-on-event debug
340 (choice (const :tag "None" nil)
341 (const :tag "When sent SIGUSR1" sigusr1)
342 (const :tag "When sent SIGUSR2" sigusr2))
343 "24.1")
344
345 ;; This is not good news because it will use the wrong
346 ;; version-specific directories when you upgrade. We need
347 ;; customization of the front of the list, maintaining the
348 ;; standard value intact at the back.
349 ;;(load-path environment
350 ;; (repeat (choice :tag "[Current dir?]"
351 ;; :format "%[Current dir?%] %v"
352 ;; (const :tag " current dir" nil)
353 ;; (directory :format "%v"))))
354 (load-prefer-newer lisp boolean "24.4")
355 ;; minibuf.c
356 (enable-recursive-minibuffers minibuffer boolean)
357 (history-length minibuffer
358 (choice (const :tag "Infinite" t) integer)
359 "24.5") ; 30 -> 100
360 (history-delete-duplicates minibuffer boolean "22.1")
361 (read-buffer-completion-ignore-case minibuffer boolean "23.1")
362
363 (minibuffer-prompt-properties
364 minibuffer
365 (list
366 (checklist :inline t
367 (const :tag "Read-Only"
368 :doc "Prevent prompt from being modified"
369 :format "%t%n%h"
370 :inline t
371 (read-only t))
372 (const :tag "Don't Enter"
373 :doc "Prevent point from ever entering prompt"
374 :format "%t%n%h"
375 :inline t
376 (cursor-intangible t)))
377 (repeat :inline t
378 :tag "Other Properties"
379 (list :inline t
380 :format "%v"
381 (symbol :tag "Property")
382 (sexp :tag "Value"))))
383 "21.1"
384 :set minibuffer-prompt-properties--setter)
385 (minibuffer-auto-raise minibuffer boolean)
386 ;; options property set at end
387 (read-buffer-function minibuffer
388 (choice (const nil)
389 function))
390 ;; msdos.c
391 (dos-unsupported-char-glyph display integer)
392 ;; nsterm.m
393 (ns-control-modifier
394 ns
395 (choice (const :tag "No modifier" nil)
396 (const control) (const meta)
397 (const alt) (const hyper)
398 (const super)) "23.1")
399 (ns-right-control-modifier
400 ns
401 (choice (const :tag "No modifier (work as control)" none)
402 (const :tag "Use the value of ns-control-modifier"
403 left)
404 (const control) (const meta)
405 (const alt) (const hyper)
406 (const super)) "24.1")
407 (ns-command-modifier
408 ns
409 (choice (const :tag "No modifier" nil)
410 (const control) (const meta)
411 (const alt) (const hyper)
412 (const super)) "23.1")
413 (ns-right-command-modifier
414 ns
415 (choice (const :tag "No modifier (work as command)" none)
416 (const :tag "Use the value of ns-command-modifier"
417 left)
418 (const control) (const meta)
419 (const alt) (const hyper)
420 (const super)) "24.1")
421 (ns-alternate-modifier
422 ns
423 (choice (const :tag "No modifier (work as alternate/option)" none)
424 (const control) (const meta)
425 (const alt) (const hyper)
426 (const super)) "23.1")
427 (ns-right-alternate-modifier
428 ns
429 (choice (const :tag "No modifier (work as alternate/option)" none)
430 (const :tag "Use the value of ns-alternate-modifier"
431 left)
432 (const control) (const meta)
433 (const alt) (const hyper)
434 (const super)) "23.3")
435 (ns-function-modifier
436 ns
437 (choice (const :tag "No modifier (work as function)" none)
438 (const control) (const meta)
439 (const alt) (const hyper)
440 (const super)) "23.1")
441 (ns-antialias-text ns boolean "23.1")
442 (ns-auto-hide-menu-bar ns boolean "24.1")
443 (ns-confirm-quit ns boolean "25.1")
444 (ns-use-native-fullscreen ns boolean "24.4")
445 (ns-use-fullscreen-animation ns boolean "25.1")
446 (ns-use-srgb-colorspace ns boolean "24.4")
447 ;; process.c
448 (delete-exited-processes processes-basics boolean)
449 ;; syntax.c
450 (parse-sexp-ignore-comments editing-basics boolean)
451 (words-include-escapes editing-basics boolean)
452 (open-paren-in-column-0-is-defun-start editing-basics boolean
453 "21.1")
454 ;; term.c
455 (visible-cursor cursor boolean "22.1")
456 ;; terminal.c
457 (ring-bell-function display
458 (choice
459 (const :tag "Default" nil)
460 (const :tag "Silent" ignore)
461 function))
462 ;; undo.c
463 (undo-limit undo integer)
464 (undo-strong-limit undo integer)
465 (undo-outer-limit undo
466 (choice integer
467 (const :tag "No limit"
468 :format "%t\n%d"
469 :doc
470 "With this choice, \
471 the undo info for the current command never gets discarded.
472 This should only be chosen under exceptional circumstances,
473 since it could result in memory overflow and make Emacs crash."
474 nil))
475 "22.1")
476 ;; window.c
477 (temp-buffer-show-function windows (choice (const nil) function))
478 (next-screen-context-lines windows integer)
479 (scroll-preserve-screen-position
480 windows (choice
481 (const :tag "Off (nil)" :value nil)
482 (const :tag "Full screen (t)" :value t)
483 (other :tag "Always" 1)) "22.1")
484 (recenter-redisplay
485 windows (choice
486 (const :tag "Never (nil)" :value nil)
487 (const :tag "Only on ttys" :value tty)
488 (other :tag "Always" t)) "23.1")
489 (window-combination-resize windows boolean "24.1")
490 (window-combination-limit
491 windows (choice
492 (const :tag "Never (nil)" :value nil)
493 (const :tag "For Temp Buffer Resize mode (temp-buffer-resize)"
494 :value temp-buffer-resize)
495 (const :tag "For temporary buffers (temp-buffer)"
496 :value temp-buffer)
497 (const :tag "For buffer display (display-buffer)"
498 :value display-buffer)
499 (other :tag "Always (t)" :value t))
500 "24.3")
501 (fast-but-imprecise-scrolling scrolling boolean "25.1")
502 (window-resize-pixelwise windows boolean "24.4")
503 ;; xdisp.c
504 ;; The whitespace group is for whitespace.el.
505 (show-trailing-whitespace editing-basics boolean nil
506 :safe booleanp)
507 (scroll-step windows integer)
508 (scroll-conservatively windows integer)
509 (scroll-margin windows integer)
510 (hscroll-margin windows integer "22.1")
511 (hscroll-step windows number "22.1")
512 (truncate-partial-width-windows
513 display
514 (choice (integer :tag "Truncate if narrower than")
515 (const :tag "Respect `truncate-lines'" nil)
516 (other :tag "Truncate if not full-width" t))
517 "23.1")
518 (make-cursor-line-fully-visible windows boolean)
519 (mode-line-in-non-selected-windows mode-line boolean "22.1")
520 (line-number-display-limit display
521 (choice integer
522 (const :tag "No limit" nil)))
523 (line-number-display-limit-width display integer "22.1")
524 (highlight-nonselected-windows display boolean)
525 (message-log-max debug (choice (const :tag "Disable" nil)
526 (integer :menu-tag "lines"
527 :format "%v")
528 (other :tag "Unlimited" t))
529 "24.3")
530 (unibyte-display-via-language-environment mule boolean)
531 (blink-cursor-alist cursor alist "22.1")
532 (overline-margin display integer "22.1")
533 (underline-minimum-offset display integer "23.1")
534 (mouse-autoselect-window
535 display (choice
536 (const :tag "Off (nil)" :value nil)
537 (const :tag "Immediate" :value t)
538 (number :tag "Delay by secs" :value 0.5)) "22.1")
539 (tool-bar-style
540 frames (choice
541 (const :tag "Images" :value image)
542 (const :tag "Text" :value text)
543 (const :tag "Both" :value both)
544 (const :tag "Both-horiz" :value both-horiz)
545 (const :tag "Text-image-horiz" :value text-image-horiz)
546 (const :tag "System default" :value nil)) "24.1")
547 (tool-bar-max-label-size frames integer "24.1")
548 (auto-hscroll-mode scrolling boolean "21.1")
549 (void-text-area-pointer cursor
550 (choice
551 (const :tag "Standard (text pointer)" :value nil)
552 (const :tag "Arrow" :value arrow)
553 (const :tag "Text pointer" :value text)
554 (const :tag "Hand" :value hand)
555 (const :tag "Vertical dragger" :value vdrag)
556 (const :tag "Horizontal dragger" :value hdrag)
557 (const :tag "Same as mode line" :value modeline)
558 (const :tag "Hourglass" :value hourglass)))
559 (display-hourglass cursor boolean)
560 (hourglass-delay cursor number)
561 (resize-mini-windows
562 windows (choice
563 (const :tag "Off (nil)" :value nil)
564 (const :tag "Fit (t)" :value t)
565 (const :tag "Grow only" :value grow-only))
566 "25.1")
567 ;; xfaces.c
568 (scalable-fonts-allowed display boolean "22.1")
569 ;; xfns.c
570 (x-bitmap-file-path installation
571 (repeat (directory :format "%v")))
572 (x-gtk-use-old-file-dialog menu boolean "22.1")
573 (x-gtk-show-hidden-files menu boolean "22.1")
574 (x-gtk-file-dialog-help-text menu boolean "22.1")
575 (x-gtk-use-system-tooltips tooltip boolean "23.3")
576 ;; xterm.c
577 (x-use-underline-position-properties display boolean "22.1")
578 (x-underline-at-descent-line display boolean "22.1")
579 (x-stretch-cursor display boolean "21.1")
580 (scroll-bar-adjust-thumb-portion windows boolean "24.4")
581 ;; xselect.c
582 (x-select-enable-clipboard-manager killing boolean "24.1")
583 ;; xsettings.c
584 (font-use-system-font font-selection boolean "23.2")))
585 (setq ;; If we did not specify any standard value expression above,
586 ;; use the current value as the standard value.
587 standard (if (setq prop (memq :standard rest))
588 (cadr prop)
589 (if (default-boundp symbol)
590 (funcall quoter (default-value symbol))))
591 ;; Don't complain about missing variables which are
592 ;; irrelevant to this platform.
593 native-p (save-match-data
594 (cond
595 ((string-match "\\`dos-" (symbol-name symbol))
596 (eq system-type 'ms-dos))
597 ((string-match "\\`w32-" (symbol-name symbol))
598 (eq system-type 'windows-nt))
599 ((string-match "\\`ns-" (symbol-name symbol))
600 (featurep 'ns))
601 ((string-match "\\`x-.*gtk" (symbol-name symbol))
602 (featurep 'gtk))
603 ((string-match "clipboard-manager" (symbol-name symbol))
604 (boundp 'x-select-enable-clipboard-manager))
605 ((string-match "\\`x-" (symbol-name symbol))
606 (fboundp 'x-create-frame))
607 ((string-match "selection" (symbol-name symbol))
608 (fboundp 'x-selection-exists-p))
609 ((string-match "fringe" (symbol-name symbol))
610 (fboundp 'define-fringe-bitmap))
611 ((string-match "\\`imagemagick" (symbol-name symbol))
612 (fboundp 'imagemagick-types))
613 ((equal "font-use-system-font" (symbol-name symbol))
614 (featurep 'system-font-setting))
615 ;; Conditioned on x-create-frame, because that's
616 ;; the condition for loadup.el to preload tool-bar.el.
617 ((string-match "tool-bar-" (symbol-name symbol))
618 (fboundp 'x-create-frame))
619 ((equal "vertical-centering-font-regexp"
620 (symbol-name symbol))
621 ;; Any function from fontset.c will do.
622 (fboundp 'new-fontset))
623 ((equal "scroll-bar-adjust-thumb-portion"
624 (symbol-name symbol))
625 (featurep 'x))
626 (t t))))
627 (if (not (boundp symbol))
628 ;; If variables are removed from C code, give an error here!
629 (and native-p
630 (message "Note, built-in variable `%S' not bound" symbol))
631 ;; Save the standard value, unless we already did.
632 (or (get symbol 'standard-value)
633 (put symbol 'standard-value (list standard)))
634 ;; We need these properties independent of whether cus-start is loaded.
635 (if (setq prop (memq :safe rest))
636 (put symbol 'safe-local-variable (cadr prop)))
637 (if (setq prop (memq :risky rest))
638 (put symbol 'risky-local-variable (cadr prop)))
639 (if (setq prop (memq :set rest))
640 (put symbol 'custom-set (cadr prop)))
641 ;; Note this is the _only_ initialize property we handle.
642 (if (eq (cadr (memq :initialize rest)) 'custom-initialize-delay)
643 ;; These vars are defined early and should hence be initialized
644 ;; early, even if this file happens to be loaded late. so add them
645 ;; to the end of custom-delayed-init-variables. Otherwise,
646 ;; auto-save-file-name-transforms will appear in M-x customize-rogue.
647 (add-to-list 'custom-delayed-init-variables symbol 'append))
648 ;; If this is NOT while dumping Emacs, set up the rest of the
649 ;; customization info. This is the stuff that is not needed
650 ;; until someone does M-x customize etc.
651 (unless purify-flag
652 ;; Add it to the right group(s).
653 (if (listp group)
654 (dolist (g group)
655 (custom-add-to-group g symbol 'custom-variable))
656 (custom-add-to-group group symbol 'custom-variable))
657 ;; Set the type.
658 (put symbol 'custom-type type)
659 (if version (put symbol 'custom-version version))
660 (while rest
661 (setq prop (car rest)
662 propval (cadr rest)
663 rest (nthcdr 2 rest))
664 (cond ((memq prop '(:standard :risky :safe :set))) ; handled above
665 ((eq prop :tag)
666 (put symbol 'custom-tag propval))))))))
667
668 (custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start
669 'custom-variable)
670
671 ;; Record cus-start as loaded if we have set up all the info that we can.
672 ;; Don't record it as loaded if we have only set up the standard values
673 ;; and safe/risky properties.
674 (unless purify-flag
675 (provide 'cus-start))
676
677 ;;; cus-start.el ends here