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