* lisp/ibuffer.el (ibuffer): Improve 'other-window' case. (Bug#23617)
[emacs.git] / lisp / cus-start.el
blobc830ed83d1da4b278c4ba40fba4322730647ad68
1 ;;; cus-start.el --- define customization properties of builtins -*- lexical-binding:t -*-
3 ;; Copyright (C) 1997, 1999-2016 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
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")))
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)
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)
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"))
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 (tooltip-reuse-hidden-frame tooltip boolean "26.1")
316 ;; fringe.c
317 (overflow-newline-into-fringe fringe boolean)
318 ;; image.c
319 (imagemagick-render-type image integer "24.1")
320 ;; indent.c
321 (indent-tabs-mode indent boolean)
322 ;; keyboard.c
323 (meta-prefix-char keyboard character)
324 (auto-save-interval auto-save integer)
325 (auto-save-timeout auto-save (choice (const :tag "off" nil)
326 (integer :format "%v")))
327 (echo-keystrokes minibuffer number)
328 (polling-period keyboard integer)
329 (double-click-time mouse (restricted-sexp
330 :match-alternatives (integerp 'nil 't)))
331 (double-click-fuzz mouse integer "22.1")
332 (help-char keyboard character)
333 (help-event-list keyboard (repeat (sexp :format "%v")))
334 (menu-prompting menu boolean)
335 (select-active-regions killing
336 (choice (const :tag "always" t)
337 (const :tag "only shift-selection or mouse-drag" only)
338 (const :tag "off" nil))
339 "24.1")
340 (debug-on-event debug
341 (choice (const :tag "None" nil)
342 (const :tag "When sent SIGUSR1" sigusr1)
343 (const :tag "When sent SIGUSR2" sigusr2))
344 "24.1")
346 ;; This is not good news because it will use the wrong
347 ;; version-specific directories when you upgrade. We need
348 ;; customization of the front of the list, maintaining the
349 ;; standard value intact at the back.
350 ;;(load-path environment
351 ;; (repeat (choice :tag "[Current dir?]"
352 ;; :format "%[Current dir?%] %v"
353 ;; (const :tag " current dir" nil)
354 ;; (directory :format "%v"))))
355 (load-prefer-newer lisp boolean "24.4")
356 ;; minibuf.c
357 (enable-recursive-minibuffers minibuffer boolean)
358 (history-length minibuffer
359 (choice (const :tag "Infinite" t) integer)
360 "24.5") ; 30 -> 100
361 (history-delete-duplicates minibuffer boolean "22.1")
362 (read-buffer-completion-ignore-case minibuffer boolean "23.1")
364 (minibuffer-prompt-properties
365 minibuffer
366 (list
367 (checklist :inline t
368 (const :tag "Read-Only"
369 :doc "Prevent prompt from being modified"
370 :format "%t%n%h"
371 :inline t
372 (read-only t))
373 (const :tag "Don't Enter"
374 :doc "Prevent point from ever entering prompt"
375 :format "%t%n%h"
376 :inline t
377 (cursor-intangible t)))
378 (repeat :inline t
379 :tag "Other Properties"
380 (list :inline t
381 :format "%v"
382 (symbol :tag "Property")
383 (sexp :tag "Value"))))
384 "21.1"
385 :set minibuffer-prompt-properties--setter)
386 (minibuffer-auto-raise minibuffer boolean)
387 ;; options property set at end
388 (read-buffer-function minibuffer
389 (choice (const nil)
390 function))
391 ;; msdos.c
392 (dos-unsupported-char-glyph display integer)
393 ;; nsterm.m
394 (ns-control-modifier
396 (choice (const :tag "No modifier" nil)
397 (const control) (const meta)
398 (const alt) (const hyper)
399 (const super)) "23.1")
400 (ns-right-control-modifier
402 (choice (const :tag "No modifier (work as control)" none)
403 (const :tag "Use the value of ns-control-modifier"
404 left)
405 (const control) (const meta)
406 (const alt) (const hyper)
407 (const super)) "24.1")
408 (ns-command-modifier
410 (choice (const :tag "No modifier" nil)
411 (const control) (const meta)
412 (const alt) (const hyper)
413 (const super)) "23.1")
414 (ns-right-command-modifier
416 (choice (const :tag "No modifier (work as command)" none)
417 (const :tag "Use the value of ns-command-modifier"
418 left)
419 (const control) (const meta)
420 (const alt) (const hyper)
421 (const super)) "24.1")
422 (ns-alternate-modifier
424 (choice (const :tag "No modifier (work as alternate/option)" none)
425 (const control) (const meta)
426 (const alt) (const hyper)
427 (const super)) "23.1")
428 (ns-right-alternate-modifier
430 (choice (const :tag "No modifier (work as alternate/option)" none)
431 (const :tag "Use the value of ns-alternate-modifier"
432 left)
433 (const control) (const meta)
434 (const alt) (const hyper)
435 (const super)) "23.3")
436 (ns-function-modifier
438 (choice (const :tag "No modifier (work as function)" none)
439 (const control) (const meta)
440 (const alt) (const hyper)
441 (const super)) "23.1")
442 (ns-antialias-text ns boolean "23.1")
443 (ns-auto-hide-menu-bar ns boolean "24.1")
444 (ns-confirm-quit ns boolean "25.1")
445 (ns-use-native-fullscreen ns boolean "24.4")
446 (ns-use-fullscreen-animation ns boolean "25.1")
447 (ns-use-srgb-colorspace ns boolean "24.4")
448 ;; process.c
449 (delete-exited-processes processes-basics boolean)
450 ;; syntax.c
451 (parse-sexp-ignore-comments editing-basics boolean)
452 (words-include-escapes editing-basics boolean)
453 (open-paren-in-column-0-is-defun-start editing-basics boolean
454 "21.1")
455 ;; term.c
456 (visible-cursor cursor boolean "22.1")
457 ;; terminal.c
458 (ring-bell-function display
459 (choice
460 (const :tag "Default" nil)
461 (const :tag "Silent" ignore)
462 function))
463 ;; undo.c
464 (undo-limit undo integer)
465 (undo-strong-limit undo integer)
466 (undo-outer-limit undo
467 (choice integer
468 (const :tag "No limit"
469 :format "%t\n%d"
470 :doc
471 "With this choice, \
472 the undo info for the current command never gets discarded.
473 This should only be chosen under exceptional circumstances,
474 since it could result in memory overflow and make Emacs crash."
475 nil))
476 "22.1")
477 ;; window.c
478 (temp-buffer-show-function windows (choice (const nil) function))
479 (next-screen-context-lines windows integer)
480 (scroll-preserve-screen-position
481 windows (choice
482 (const :tag "Off (nil)" :value nil)
483 (const :tag "Full screen (t)" :value t)
484 (other :tag "Always" 1)) "22.1")
485 (recenter-redisplay
486 windows (choice
487 (const :tag "Never (nil)" :value nil)
488 (const :tag "Only on ttys" :value tty)
489 (other :tag "Always" t)) "23.1")
490 (window-combination-resize windows boolean "24.1")
491 (window-combination-limit
492 windows (choice
493 (const :tag "Never (nil)" :value nil)
494 (const :tag "For Temp Buffer Resize mode (temp-buffer-resize)"
495 :value temp-buffer-resize)
496 (const :tag "For temporary buffers (temp-buffer)"
497 :value temp-buffer)
498 (const :tag "For buffer display (display-buffer)"
499 :value display-buffer)
500 (other :tag "Always (t)" :value t))
501 "24.3")
502 (fast-but-imprecise-scrolling scrolling boolean "25.1")
503 (window-resize-pixelwise windows boolean "24.4")
504 ;; xdisp.c
505 ;; The whitespace group is for whitespace.el.
506 (show-trailing-whitespace editing-basics boolean nil
507 :safe booleanp)
508 (scroll-step windows integer)
509 (scroll-conservatively windows integer)
510 (scroll-margin windows integer)
511 (hscroll-margin windows integer "22.1")
512 (hscroll-step windows number "22.1")
513 (truncate-partial-width-windows
514 display
515 (choice (integer :tag "Truncate if narrower than")
516 (const :tag "Respect `truncate-lines'" nil)
517 (other :tag "Truncate if not full-width" t))
518 "23.1")
519 (make-cursor-line-fully-visible windows boolean)
520 (mode-line-in-non-selected-windows mode-line boolean "22.1")
521 (line-number-display-limit display
522 (choice integer
523 (const :tag "No limit" nil)))
524 (line-number-display-limit-width display integer "22.1")
525 (highlight-nonselected-windows display boolean)
526 (message-log-max debug (choice (const :tag "Disable" nil)
527 (integer :menu-tag "lines"
528 :format "%v")
529 (other :tag "Unlimited" t))
530 "24.3")
531 (unibyte-display-via-language-environment mule boolean)
532 (blink-cursor-alist cursor alist "22.1")
533 (overline-margin display integer "22.1")
534 (underline-minimum-offset display integer "23.1")
535 (mouse-autoselect-window
536 display (choice
537 (const :tag "Off (nil)" :value nil)
538 (const :tag "Immediate" :value t)
539 (number :tag "Delay by secs" :value 0.5)) "22.1")
540 (tool-bar-style
541 frames (choice
542 (const :tag "Images" :value image)
543 (const :tag "Text" :value text)
544 (const :tag "Both" :value both)
545 (const :tag "Both-horiz" :value both-horiz)
546 (const :tag "Text-image-horiz" :value text-image-horiz)
547 (const :tag "System default" :value nil)) "24.1")
548 (tool-bar-max-label-size frames integer "24.1")
549 (auto-hscroll-mode scrolling boolean "21.1")
550 (void-text-area-pointer cursor
551 (choice
552 (const :tag "Standard (text pointer)" :value nil)
553 (const :tag "Arrow" :value arrow)
554 (const :tag "Text pointer" :value text)
555 (const :tag "Hand" :value hand)
556 (const :tag "Vertical dragger" :value vdrag)
557 (const :tag "Horizontal dragger" :value hdrag)
558 (const :tag "Same as mode line" :value modeline)
559 (const :tag "Hourglass" :value hourglass)))
560 (display-hourglass cursor boolean)
561 (hourglass-delay cursor number)
562 (resize-mini-windows
563 windows (choice
564 (const :tag "Off (nil)" :value nil)
565 (const :tag "Fit (t)" :value t)
566 (const :tag "Grow only" :value grow-only))
567 "25.1")
568 ;; xfaces.c
569 (scalable-fonts-allowed display boolean "22.1")
570 ;; xfns.c
571 (x-bitmap-file-path installation
572 (repeat (directory :format "%v")))
573 (x-gtk-use-old-file-dialog menu boolean "22.1")
574 (x-gtk-show-hidden-files menu boolean "22.1")
575 (x-gtk-file-dialog-help-text menu boolean "22.1")
576 (x-gtk-use-system-tooltips tooltip boolean "23.3")
577 ;; xterm.c
578 (x-use-underline-position-properties display boolean "22.1")
579 (x-underline-at-descent-line display boolean "22.1")
580 (x-stretch-cursor display boolean "21.1")
581 (scroll-bar-adjust-thumb-portion windows boolean "24.4")
582 ;; xselect.c
583 (x-select-enable-clipboard-manager killing boolean "24.1")
584 ;; xsettings.c
585 (font-use-system-font font-selection boolean "23.2")))
586 (setq ;; If we did not specify any standard value expression above,
587 ;; use the current value as the standard value.
588 standard (if (setq prop (memq :standard rest))
589 (cadr prop)
590 (if (default-boundp symbol)
591 (funcall quoter (default-value symbol))))
592 ;; Don't complain about missing variables which are
593 ;; irrelevant to this platform.
594 native-p (save-match-data
595 (cond
596 ((string-match "\\`dos-" (symbol-name symbol))
597 (eq system-type 'ms-dos))
598 ((string-match "\\`w32-" (symbol-name symbol))
599 (eq system-type 'windows-nt))
600 ((string-match "\\`ns-" (symbol-name symbol))
601 (featurep 'ns))
602 ((string-match "\\`x-.*gtk" (symbol-name symbol))
603 (featurep 'gtk))
604 ((string-match "clipboard-manager" (symbol-name symbol))
605 (boundp 'x-select-enable-clipboard-manager))
606 ((string-match "\\`x-" (symbol-name symbol))
607 (fboundp 'x-create-frame))
608 ((string-match "selection" (symbol-name symbol))
609 (fboundp 'x-selection-exists-p))
610 ((string-match "fringe" (symbol-name symbol))
611 (fboundp 'define-fringe-bitmap))
612 ((string-match "\\`imagemagick" (symbol-name symbol))
613 (fboundp 'imagemagick-types))
614 ((equal "font-use-system-font" (symbol-name symbol))
615 (featurep 'system-font-setting))
616 ;; Conditioned on x-create-frame, because that's
617 ;; the condition for loadup.el to preload tool-bar.el.
618 ((string-match "tool-bar-" (symbol-name symbol))
619 (fboundp 'x-create-frame))
620 ((equal "vertical-centering-font-regexp"
621 (symbol-name symbol))
622 ;; Any function from fontset.c will do.
623 (fboundp 'new-fontset))
624 ((equal "scroll-bar-adjust-thumb-portion"
625 (symbol-name symbol))
626 (featurep 'x))
627 (t t))))
628 (if (not (boundp symbol))
629 ;; If variables are removed from C code, give an error here!
630 (and native-p
631 (message "Note, built-in variable `%S' not bound" symbol))
632 ;; Save the standard value, unless we already did.
633 (or (get symbol 'standard-value)
634 (put symbol 'standard-value (list standard)))
635 ;; We need these properties independent of whether cus-start is loaded.
636 (if (setq prop (memq :safe rest))
637 (put symbol 'safe-local-variable (cadr prop)))
638 (if (setq prop (memq :risky rest))
639 (put symbol 'risky-local-variable (cadr prop)))
640 (if (setq prop (memq :set rest))
641 (put symbol 'custom-set (cadr prop)))
642 ;; Note this is the _only_ initialize property we handle.
643 (if (eq (cadr (memq :initialize rest)) 'custom-initialize-delay)
644 ;; These vars are defined early and should hence be initialized
645 ;; early, even if this file happens to be loaded late. so add them
646 ;; to the end of custom-delayed-init-variables. Otherwise,
647 ;; auto-save-file-name-transforms will appear in M-x customize-rogue.
648 (add-to-list 'custom-delayed-init-variables symbol 'append))
649 ;; If this is NOT while dumping Emacs, set up the rest of the
650 ;; customization info. This is the stuff that is not needed
651 ;; until someone does M-x customize etc.
652 (unless purify-flag
653 ;; Add it to the right group(s).
654 (if (listp group)
655 (dolist (g group)
656 (custom-add-to-group g symbol 'custom-variable))
657 (custom-add-to-group group symbol 'custom-variable))
658 ;; Set the type.
659 (put symbol 'custom-type type)
660 (if version (put symbol 'custom-version version))
661 (while rest
662 (setq prop (car rest)
663 propval (cadr rest)
664 rest (nthcdr 2 rest))
665 (cond ((memq prop '(:standard :risky :safe :set))) ; handled above
666 ((eq prop :tag)
667 (put symbol 'custom-tag propval))))))))
669 (custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start
670 'custom-variable)
672 ;; Record cus-start as loaded if we have set up all the info that we can.
673 ;; Don't record it as loaded if we have only set up the standard values
674 ;; and safe/risky properties.
675 (unless purify-flag
676 (provide 'cus-start))
678 ;;; cus-start.el ends here