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