Bind grep-highlight-matches around the rgrep call
[emacs.git] / lisp / cus-start.el
blob69dbf0d0c573b9d6e049f74226533679782942ac
1 ;;; cus-start.el --- define customization properties of builtins -*- lexical-binding:t -*-
3 ;; Copyright (C) 1997, 1999-2015 Free Software Foundation, Inc.
5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
6 ;; Keywords: internal
7 ;; Package: emacs
9 ;; This file is part of GNU Emacs.
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.
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.
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/>.
24 ;;; Commentary:
26 ;; This file adds customize support for built-in variables.
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.
34 ;;; Code:
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.
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")))
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)
223 ;; doc.c
224 (help-quote-translation help
225 (choice
226 (character :tag "Quote with curved quotes"
227 :value ?‘)
228 (character :tag "Quote 'like this'" :value ?\')
229 (character :tag "Quote `like this'" :value ?\`)
230 (const :tag "Quote with curved quotes if displayable, 'like this' otherwise" nil))
231 "25.1")
232 ;; dosfns.c
233 (dos-display-scancodes display boolean)
234 (dos-hyper-key keyboard integer)
235 (dos-super-key keyboard integer)
236 (dos-keypad-mode keyboard integer)
238 ;; editfns.c
239 (user-full-name mail string)
240 ;; emacs.c
241 (report-emacs-bug-address emacsbug string)
242 ;; eval.c
243 (max-specpdl-size limits integer)
244 (max-lisp-eval-depth limits integer)
245 (max-mini-window-height limits
246 (choice (const :tag "quarter screen" nil)
247 number) "23.1")
248 (debug-on-error debug
249 (choice (const :tag "off")
250 (repeat :menu-tag "When"
251 :value (nil)
252 (symbol :format "%v"))
253 (const :tag "always" t)))
254 (debug-ignored-errors debug (repeat (choice symbol regexp)))
255 (debug-on-quit debug boolean)
256 (debug-on-signal debug boolean)
257 ;; fileio.c
258 (delete-by-moving-to-trash auto-save boolean "23.1")
259 (auto-save-visited-file-name auto-save boolean)
260 ;; filelock.c
261 (create-lockfiles files boolean "24.3")
262 (temporary-file-directory
263 ;; Darwin section added 24.1, does not seem worth :version bump.
264 files directory nil
265 :standard
266 (file-name-as-directory
267 ;; FIXME ? Should there be Ftemporary_file_directory to do this
268 ;; more robustly (cf set_local_socket in emacsclient.c).
269 ;; It could be used elsewhere, eg Fcall_process_region,
270 ;; server-socket-dir. See bug#7135.
271 (cond ((memq system-type '(ms-dos windows-nt))
272 (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP")
273 "c:/temp"))
274 ((eq system-type 'darwin)
275 (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
276 ;; See bug#7135.
277 (let ((tmp (ignore-errors
278 (shell-command-to-string
279 "getconf DARWIN_USER_TEMP_DIR"))))
280 (and (stringp tmp)
281 (setq tmp (replace-regexp-in-string
282 "\n\\'" "" tmp))
283 ;; Handles "getconf: Unrecognized variable..."
284 (file-directory-p tmp)
285 tmp))
286 "/tmp"))
288 (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
289 "/tmp"))))
290 :initialize custom-initialize-delay)
291 ;; fns.c
292 (use-dialog-box menu boolean "21.1")
293 (use-file-dialog menu boolean "22.1")
294 (focus-follows-mouse frames boolean "20.3")
295 ;; fontset.c
296 ;; FIXME nil is the initial value, fontset.el setqs it.
297 (vertical-centering-font-regexp display
298 (choice (const nil) regexp))
299 ;; frame.c
300 (default-frame-alist frames
301 (repeat (cons :format "%v"
302 (symbol :tag "Parameter")
303 (sexp :tag "Value"))))
304 (mouse-highlight mouse (choice (const :tag "disabled" nil)
305 (const :tag "always shown" t)
306 (other :tag "hidden by keypress" 1))
307 "22.1")
308 (make-pointer-invisible mouse boolean "23.2")
309 (menu-bar-mode frames boolean nil
310 ;; FIXME?
311 ;; :initialize custom-initialize-default
312 :set custom-set-minor-mode)
313 (tool-bar-mode (frames mouse) boolean nil
314 ;; :initialize custom-initialize-default
315 :set custom-set-minor-mode)
316 (frame-resize-pixelwise frames boolean "24.4")
317 (frame-inhibit-implied-resize frames
318 (choice
319 (const :tag "Never" nil)
320 (const :tag "Always" t)
321 (repeat (symbol :tag "Parameter")))
322 "25.1")
323 ;; fringe.c
324 (overflow-newline-into-fringe fringe boolean)
325 ;; image.c
326 (imagemagick-render-type image integer "24.1")
327 ;; indent.c
328 (indent-tabs-mode indent boolean)
329 ;; keyboard.c
330 (meta-prefix-char keyboard character)
331 (auto-save-interval auto-save integer)
332 (auto-save-timeout auto-save (choice (const :tag "off" nil)
333 (integer :format "%v")))
334 (echo-keystrokes minibuffer number)
335 (polling-period keyboard integer)
336 (double-click-time mouse (restricted-sexp
337 :match-alternatives (integerp 'nil 't)))
338 (double-click-fuzz mouse integer "22.1")
339 (help-char keyboard character)
340 (help-event-list keyboard (repeat (sexp :format "%v")))
341 (menu-prompting menu boolean)
342 (select-active-regions killing
343 (choice (const :tag "always" t)
344 (const :tag "only shift-selection or mouse-drag" only)
345 (const :tag "off" nil))
346 "24.1")
347 (debug-on-event debug
348 (choice (const :tag "None" nil)
349 (const :tag "When sent SIGUSR1" sigusr1)
350 (const :tag "When sent SIGUSR2" sigusr2))
351 "24.1")
353 ;; This is not good news because it will use the wrong
354 ;; version-specific directories when you upgrade. We need
355 ;; customization of the front of the list, maintaining the
356 ;; standard value intact at the back.
357 ;;(load-path environment
358 ;; (repeat (choice :tag "[Current dir?]"
359 ;; :format "%[Current dir?%] %v"
360 ;; (const :tag " current dir" nil)
361 ;; (directory :format "%v"))))
362 (load-prefer-newer lisp boolean "24.4")
363 ;; minibuf.c
364 (enable-recursive-minibuffers minibuffer boolean)
365 (history-length minibuffer
366 (choice (const :tag "Infinite" t) integer)
367 "24.5") ; 30 -> 100
368 (history-delete-duplicates minibuffer boolean "22.1")
369 (read-buffer-completion-ignore-case minibuffer boolean "23.1")
371 (minibuffer-prompt-properties
372 minibuffer
373 (list
374 (checklist :inline t
375 (const :tag "Read-Only"
376 :doc "Prevent prompt from being modified"
377 :format "%t%n%h"
378 :inline t
379 (read-only t))
380 (const :tag "Don't Enter"
381 :doc "Prevent point from ever entering prompt"
382 :format "%t%n%h"
383 :inline t
384 (cursor-intangible t)))
385 (repeat :inline t
386 :tag "Other Properties"
387 (list :inline t
388 :format "%v"
389 (symbol :tag "Property")
390 (sexp :tag "Value"))))
391 "21.1"
392 :set minibuffer-prompt-properties--setter)
393 (minibuffer-auto-raise minibuffer boolean)
394 ;; options property set at end
395 (read-buffer-function minibuffer
396 (choice (const nil)
397 function))
398 ;; msdos.c
399 (dos-unsupported-char-glyph display integer)
400 ;; nsterm.m
401 (ns-control-modifier
403 (choice (const :tag "No modifier" nil)
404 (const control) (const meta)
405 (const alt) (const hyper)
406 (const super)) "23.1")
407 (ns-right-control-modifier
409 (choice (const :tag "No modifier (work as control)" none)
410 (const :tag "Use the value of ns-control-modifier"
411 left)
412 (const control) (const meta)
413 (const alt) (const hyper)
414 (const super)) "24.1")
415 (ns-command-modifier
417 (choice (const :tag "No modifier" nil)
418 (const control) (const meta)
419 (const alt) (const hyper)
420 (const super)) "23.1")
421 (ns-right-command-modifier
423 (choice (const :tag "No modifier (work as command)" none)
424 (const :tag "Use the value of ns-command-modifier"
425 left)
426 (const control) (const meta)
427 (const alt) (const hyper)
428 (const super)) "24.1")
429 (ns-alternate-modifier
431 (choice (const :tag "No modifier (work as alternate/option)" none)
432 (const control) (const meta)
433 (const alt) (const hyper)
434 (const super)) "23.1")
435 (ns-right-alternate-modifier
437 (choice (const :tag "No modifier (work as alternate/option)" none)
438 (const :tag "Use the value of ns-alternate-modifier"
439 left)
440 (const control) (const meta)
441 (const alt) (const hyper)
442 (const super)) "23.3")
443 (ns-function-modifier
445 (choice (const :tag "No modifier (work as function)" none)
446 (const control) (const meta)
447 (const alt) (const hyper)
448 (const super)) "23.1")
449 (ns-antialias-text ns boolean "23.1")
450 (ns-auto-hide-menu-bar ns boolean "24.1")
451 (ns-confirm-quit ns boolean "25.1")
452 (ns-use-native-fullscreen ns boolean "24.4")
453 (ns-use-fullscreen-animation ns boolean "25.1")
454 (ns-use-srgb-colorspace ns boolean "24.4")
455 ;; process.c
456 (delete-exited-processes processes-basics boolean)
457 ;; syntax.c
458 (parse-sexp-ignore-comments editing-basics boolean)
459 (words-include-escapes editing-basics boolean)
460 (open-paren-in-column-0-is-defun-start editing-basics boolean
461 "21.1")
462 ;; term.c
463 (visible-cursor cursor boolean "22.1")
464 ;; terminal.c
465 (ring-bell-function display
466 (choice
467 (const :tag "Default" nil)
468 (const :tag "Silent" ignore)
469 function))
470 ;; undo.c
471 (undo-limit undo integer)
472 (undo-strong-limit undo integer)
473 (undo-outer-limit undo
474 (choice integer
475 (const :tag "No limit"
476 :format "%t\n%d"
477 :doc
478 "With this choice, \
479 the undo info for the current command never gets discarded.
480 This should only be chosen under exceptional circumstances,
481 since it could result in memory overflow and make Emacs crash."
482 nil))
483 "22.1")
484 ;; window.c
485 (temp-buffer-show-function windows (choice (const nil) function))
486 (next-screen-context-lines windows integer)
487 (scroll-preserve-screen-position
488 windows (choice
489 (const :tag "Off (nil)" :value nil)
490 (const :tag "Full screen (t)" :value t)
491 (other :tag "Always" 1)) "22.1")
492 (recenter-redisplay
493 windows (choice
494 (const :tag "Never (nil)" :value nil)
495 (const :tag "Only on ttys" :value tty)
496 (other :tag "Always" t)) "23.1")
497 (window-combination-resize windows boolean "24.1")
498 (window-combination-limit
499 windows (choice
500 (const :tag "Never (nil)" :value nil)
501 (const :tag "For Temp Buffer Resize mode (temp-buffer-resize)"
502 :value temp-buffer-resize)
503 (const :tag "For temporary buffers (temp-buffer)"
504 :value temp-buffer)
505 (const :tag "For buffer display (display-buffer)"
506 :value display-buffer)
507 (other :tag "Always (t)" :value t))
508 "24.3")
509 (fast-but-imprecise-scrolling scrolling boolean "25.1")
510 (window-resize-pixelwise windows boolean "24.4")
511 ;; xdisp.c
512 ;; The whitespace group is for whitespace.el.
513 (show-trailing-whitespace editing-basics boolean nil
514 :safe booleanp)
515 (scroll-step windows integer)
516 (scroll-conservatively windows integer)
517 (scroll-margin windows integer)
518 (hscroll-margin windows integer "22.1")
519 (hscroll-step windows number "22.1")
520 (truncate-partial-width-windows
521 display
522 (choice (integer :tag "Truncate if narrower than")
523 (const :tag "Respect `truncate-lines'" nil)
524 (other :tag "Truncate if not full-width" t))
525 "23.1")
526 (make-cursor-line-fully-visible windows boolean)
527 (mode-line-in-non-selected-windows mode-line boolean "22.1")
528 (line-number-display-limit display
529 (choice integer
530 (const :tag "No limit" nil)))
531 (line-number-display-limit-width display integer "22.1")
532 (highlight-nonselected-windows display boolean)
533 (message-log-max debug (choice (const :tag "Disable" nil)
534 (integer :menu-tag "lines"
535 :format "%v")
536 (other :tag "Unlimited" t))
537 "24.3")
538 (unibyte-display-via-language-environment mule boolean)
539 (blink-cursor-alist cursor alist "22.1")
540 (overline-margin display integer "22.1")
541 (underline-minimum-offset display integer "23.1")
542 (mouse-autoselect-window
543 display (choice
544 (const :tag "Off (nil)" :value nil)
545 (const :tag "Immediate" :value t)
546 (number :tag "Delay by secs" :value 0.5)) "22.1")
547 (tool-bar-style
548 frames (choice
549 (const :tag "Images" :value image)
550 (const :tag "Text" :value text)
551 (const :tag "Both" :value both)
552 (const :tag "Both-horiz" :value both-horiz)
553 (const :tag "Text-image-horiz" :value text-image-horiz)
554 (const :tag "System default" :value nil)) "24.1")
555 (tool-bar-max-label-size frames integer "24.1")
556 (auto-hscroll-mode scrolling boolean "21.1")
557 (void-text-area-pointer cursor
558 (choice
559 (const :tag "Standard (text pointer)" :value nil)
560 (const :tag "Arrow" :value arrow)
561 (const :tag "Text pointer" :value text)
562 (const :tag "Hand" :value hand)
563 (const :tag "Vertical dragger" :value vdrag)
564 (const :tag "Horizontal dragger" :value hdrag)
565 (const :tag "Same as mode line" :value modeline)
566 (const :tag "Hourglass" :value hourglass)))
567 (display-hourglass cursor boolean)
568 (hourglass-delay cursor number)
569 (resize-mini-windows
570 windows (choice
571 (const :tag "Off (nil)" :value nil)
572 (const :tag "Fit (t)" :value t)
573 (const :tag "Grow only" :value grow-only))
574 "25.1")
575 ;; xfaces.c
576 (scalable-fonts-allowed display boolean "22.1")
577 ;; xfns.c
578 (x-bitmap-file-path installation
579 (repeat (directory :format "%v")))
580 (x-gtk-use-old-file-dialog menu boolean "22.1")
581 (x-gtk-show-hidden-files menu boolean "22.1")
582 (x-gtk-file-dialog-help-text menu boolean "22.1")
583 (x-gtk-use-system-tooltips tooltip boolean "23.3")
584 ;; xterm.c
585 (x-use-underline-position-properties display boolean "22.1")
586 (x-underline-at-descent-line display boolean "22.1")
587 (x-stretch-cursor display boolean "21.1")
588 (scroll-bar-adjust-thumb-portion windows boolean "24.4")
589 ;; xselect.c
590 (x-select-enable-clipboard-manager killing boolean "24.1")
591 ;; xsettings.c
592 (font-use-system-font font-selection boolean "23.2")))
593 (setq ;; If we did not specify any standard value expression above,
594 ;; use the current value as the standard value.
595 standard (if (setq prop (memq :standard rest))
596 (cadr prop)
597 (if (default-boundp symbol)
598 (funcall quoter (default-value symbol))))
599 ;; Don't complain about missing variables which are
600 ;; irrelevant to this platform.
601 native-p (save-match-data
602 (cond
603 ((string-match "\\`dos-" (symbol-name symbol))
604 (eq system-type 'ms-dos))
605 ((string-match "\\`w32-" (symbol-name symbol))
606 (eq system-type 'windows-nt))
607 ((string-match "\\`ns-" (symbol-name symbol))
608 (featurep 'ns))
609 ((string-match "\\`x-.*gtk" (symbol-name symbol))
610 (featurep 'gtk))
611 ((string-match "clipboard-manager" (symbol-name symbol))
612 (boundp 'x-select-enable-clipboard-manager))
613 ((string-match "\\`x-" (symbol-name symbol))
614 (fboundp 'x-create-frame))
615 ((string-match "selection" (symbol-name symbol))
616 (fboundp 'x-selection-exists-p))
617 ((string-match "fringe" (symbol-name symbol))
618 (fboundp 'define-fringe-bitmap))
619 ((string-match "\\`imagemagick" (symbol-name symbol))
620 (fboundp 'imagemagick-types))
621 ((equal "font-use-system-font" (symbol-name symbol))
622 (featurep 'system-font-setting))
623 ;; Conditioned on x-create-frame, because that's
624 ;; the condition for loadup.el to preload tool-bar.el.
625 ((string-match "tool-bar-" (symbol-name symbol))
626 (fboundp 'x-create-frame))
627 ((equal "vertical-centering-font-regexp"
628 (symbol-name symbol))
629 ;; Any function from fontset.c will do.
630 (fboundp 'new-fontset))
631 ((equal "scroll-bar-adjust-thumb-portion"
632 (symbol-name symbol))
633 (featurep 'x))
634 (t t))))
635 (if (not (boundp symbol))
636 ;; If variables are removed from C code, give an error here!
637 (and native-p
638 (message "Note, built-in variable `%S' not bound" symbol))
639 ;; Save the standard value, unless we already did.
640 (or (get symbol 'standard-value)
641 (put symbol 'standard-value (list standard)))
642 ;; We need these properties independent of whether cus-start is loaded.
643 (if (setq prop (memq :safe rest))
644 (put symbol 'safe-local-variable (cadr prop)))
645 (if (setq prop (memq :risky rest))
646 (put symbol 'risky-local-variable (cadr prop)))
647 (if (setq prop (memq :set rest))
648 (put symbol 'custom-set (cadr prop)))
649 ;; Note this is the _only_ initialize property we handle.
650 (if (eq (cadr (memq :initialize rest)) 'custom-initialize-delay)
651 ;; These vars are defined early and should hence be initialized
652 ;; early, even if this file happens to be loaded late. so add them
653 ;; to the end of custom-delayed-init-variables. Otherwise,
654 ;; auto-save-file-name-transforms will appear in M-x customize-rogue.
655 (add-to-list 'custom-delayed-init-variables symbol 'append))
656 ;; If this is NOT while dumping Emacs, set up the rest of the
657 ;; customization info. This is the stuff that is not needed
658 ;; until someone does M-x customize etc.
659 (unless purify-flag
660 ;; Add it to the right group(s).
661 (if (listp group)
662 (dolist (g group)
663 (custom-add-to-group g symbol 'custom-variable))
664 (custom-add-to-group group symbol 'custom-variable))
665 ;; Set the type.
666 (put symbol 'custom-type type)
667 (if version (put symbol 'custom-version version))
668 (while rest
669 (setq prop (car rest)
670 propval (cadr rest)
671 rest (nthcdr 2 rest))
672 (cond ((memq prop '(:standard :risky :safe :set))) ; handled above
673 ((eq prop :tag)
674 (put symbol 'custom-tag propval))))))))
676 (custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start
677 'custom-variable)
679 ;; Record cus-start as loaded if we have set up all the info that we can.
680 ;; Don't record it as loaded if we have only set up the standard values
681 ;; and safe/risky properties.
682 (unless purify-flag
683 (provide 'cus-start))
685 ;;; cus-start.el ends here