Avoid 64-bit compilation warnings in unexw32.c
[emacs.git] / lisp / cus-start.el
blobb197f2f1de597fdfb1c9593167f32b0b61eda70a
1 ;;; cus-start.el --- define customization properties of builtins -*- lexical-binding:t -*-
3 ;; Copyright (C) 1997, 1999-2017 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 <https://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 (lambda (f)
177 (if f (directory-file-name f)
178 "."))
179 (append (parse-colon-path (getenv "PATH"))
180 (list exec-directory))))
181 (exec-suffixes execute (repeat string))
182 ;; charset.c
183 (charset-map-path installation
184 (repeat (directory :format "%v")))
185 ;; coding.c
186 (inhibit-eol-conversion mule boolean)
187 (enable-character-translation mule boolean)
188 (eol-mnemonic-undecided mule string)
189 ;; startup.el fiddles with the values. IMO, would be
190 ;; simpler to just use #ifdefs in coding.c.
191 (eol-mnemonic-unix mule string nil
192 :standard
193 (if (memq system-type '(ms-dos windows-nt))
194 "(Unix)" ":"))
195 (eol-mnemonic-dos mule string nil
196 :standard
197 (if (memq system-type '(ms-dos windows-nt))
198 "\\" "(DOS)"))
199 (eol-mnemonic-mac mule string nil
200 :standard "(Mac)")
201 (file-coding-system-alist
202 mule
203 (alist
204 :key-type (regexp :tag "File regexp")
205 :value-type (choice
206 :value (undecided . undecided)
207 (cons :tag "Encoding/decoding pair"
208 :value (undecided . undecided)
209 (coding-system :tag "Decoding")
210 (coding-system :tag "Encoding"))
211 (coding-system
212 :tag "Single coding system"
213 :value undecided
214 :match (lambda (widget value)
215 (and value (not (functionp value)))))
216 (function :value ignore))))
217 ;; dired.c
218 (completion-ignored-extensions dired
219 (repeat (string :format "%v")))
220 ;; dispnew.c
221 (baud-rate display integer)
222 (inverse-video display boolean)
223 (visible-bell display boolean)
224 (no-redraw-on-reenter display boolean)
226 ;; dosfns.c
227 (dos-display-scancodes display boolean)
228 (dos-hyper-key keyboard integer)
229 (dos-super-key keyboard integer)
230 (dos-keypad-mode keyboard integer)
232 ;; editfns.c
233 (user-full-name mail string)
234 ;; emacs.c
235 (report-emacs-bug-address emacsbug string)
236 ;; eval.c
237 (max-specpdl-size limits integer)
238 (max-lisp-eval-depth limits integer)
239 (max-mini-window-height limits
240 (choice (const :tag "quarter screen" nil)
241 number) "23.1")
242 (debug-on-error debug
243 (choice (const :tag "off")
244 (repeat :menu-tag "When"
245 :value (nil)
246 (symbol :format "%v"))
247 (const :tag "always" t)))
248 (debug-ignored-errors debug (repeat (choice symbol regexp)))
249 (debug-on-quit debug boolean)
250 (debug-on-signal debug boolean)
251 (debugger-stack-frame-as-list debugger boolean "26.1")
252 ;; fileio.c
253 (delete-by-moving-to-trash auto-save boolean "23.1")
254 (auto-save-visited-file-name auto-save boolean)
255 ;; filelock.c
256 (create-lockfiles files boolean "24.3")
257 (temporary-file-directory
258 ;; Darwin section added 24.1, does not seem worth :version bump.
259 files directory nil
260 :standard
261 (file-name-as-directory
262 ;; FIXME ? Should there be Ftemporary_file_directory to do this
263 ;; more robustly (cf set_local_socket in emacsclient.c).
264 ;; It could be used elsewhere, eg Fcall_process_region,
265 ;; server-socket-dir. See bug#7135.
266 (cond ((memq system-type '(ms-dos windows-nt))
267 (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP")
268 "c:/temp"))
269 ((eq system-type 'darwin)
270 (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
271 ;; See bug#7135.
272 (let ((tmp (ignore-errors
273 (shell-command-to-string
274 "getconf DARWIN_USER_TEMP_DIR"))))
275 (and (stringp tmp)
276 (setq tmp (replace-regexp-in-string
277 "\n\\'" "" tmp))
278 ;; Handles "getconf: Unrecognized variable..."
279 (file-directory-p tmp)
280 tmp))
281 "/tmp"))
283 (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
284 "/tmp"))))
285 :initialize custom-initialize-delay)
286 ;; fns.c
287 (use-dialog-box menu boolean "21.1")
288 (use-file-dialog menu boolean "22.1")
289 (focus-follows-mouse
290 frames (choice
291 (const :tag "Off (nil)" :value nil)
292 (const :tag "On (t)" :value t)
293 (const :tag "Auto-raise" :value auto-raise)) "26.1")
294 ;; fontset.c
295 ;; FIXME nil is the initial value, fontset.el setqs it.
296 (vertical-centering-font-regexp display
297 (choice (const nil) regexp))
298 ;; frame.c
299 (default-frame-alist frames
300 (repeat (cons :format "%v"
301 (symbol :tag "Parameter")
302 (sexp :tag "Value"))))
303 (mouse-highlight mouse (choice (const :tag "disabled" nil)
304 (const :tag "always shown" t)
305 (other :tag "hidden by keypress" 1))
306 "22.1")
307 (make-pointer-invisible mouse boolean "23.2")
308 (menu-bar-mode frames boolean nil
309 ;; FIXME?
310 ;; :initialize custom-initialize-default
311 :set custom-set-minor-mode)
312 (tool-bar-mode (frames mouse) boolean nil
313 ;; :initialize custom-initialize-default
314 :set custom-set-minor-mode)
315 (frame-resize-pixelwise frames boolean "24.4")
316 (frame-inhibit-implied-resize frames
317 (choice
318 (const :tag "Never" nil)
319 (const :tag "Always" t)
320 (repeat (symbol :tag "Parameter")))
321 "25.1")
322 (tooltip-reuse-hidden-frame tooltip boolean "26.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 "If requested via buffer display alist (window-size)"
502 :value window-size)
503 (const :tag "With Temp Buffer Resize mode (temp-buffer-resize)"
504 :value temp-buffer-resize)
505 (const :tag "For temporary buffers (temp-buffer)"
506 :value temp-buffer)
507 (const :tag "For buffer display (display-buffer)"
508 :value display-buffer)
509 (other :tag "Always (t)" :value t))
510 "26.1")
511 (fast-but-imprecise-scrolling scrolling boolean "25.1")
512 (window-resize-pixelwise windows boolean "24.4")
513 ;; xdisp.c
514 ;; The whitespace group is for whitespace.el.
515 (show-trailing-whitespace editing-basics boolean nil
516 :safe booleanp)
517 (scroll-step windows integer)
518 (scroll-conservatively windows integer)
519 (scroll-margin windows integer)
520 (maximum-scroll-margin windows float "26.1")
521 (hscroll-margin windows integer "22.1")
522 (hscroll-step windows number "22.1")
523 (truncate-partial-width-windows
524 display
525 (choice (integer :tag "Truncate if narrower than")
526 (const :tag "Respect `truncate-lines'" nil)
527 (other :tag "Truncate if not full-width" t))
528 "23.1")
529 (make-cursor-line-fully-visible windows boolean)
530 (mode-line-in-non-selected-windows mode-line boolean "22.1")
531 (line-number-display-limit display
532 (choice integer
533 (const :tag "No limit" nil)))
534 (line-number-display-limit-width display integer "22.1")
535 (highlight-nonselected-windows display boolean)
536 (message-log-max debug (choice (const :tag "Disable" nil)
537 (integer :menu-tag "lines"
538 :format "%v")
539 (other :tag "Unlimited" t))
540 "24.3")
541 (unibyte-display-via-language-environment mule boolean)
542 (blink-cursor-alist cursor alist "22.1")
543 (overline-margin display integer "22.1")
544 (underline-minimum-offset display integer "23.1")
545 (mouse-autoselect-window
546 display (choice
547 (const :tag "Off (nil)" :value nil)
548 (const :tag "Immediate" :value t)
549 (number :tag "Delay by secs" :value 0.5)) "22.1")
550 (tool-bar-style
551 frames (choice
552 (const :tag "Images" :value image)
553 (const :tag "Text" :value text)
554 (const :tag "Both" :value both)
555 (const :tag "Both-horiz" :value both-horiz)
556 (const :tag "Text-image-horiz" :value text-image-horiz)
557 (const :tag "System default" :value nil)) "24.1")
558 (tool-bar-max-label-size frames integer "24.1")
559 (auto-hscroll-mode scrolling
560 (choice
561 (const :tag "Don't scroll automatically"
562 :value nil)
563 (const :tag "Scroll the entire window"
564 :value t)
565 (const :tag "Scroll only the current line"
566 :value current-line))
567 "26.1")
568 (void-text-area-pointer cursor
569 (choice
570 (const :tag "Standard (text pointer)" :value nil)
571 (const :tag "Arrow" :value arrow)
572 (const :tag "Text pointer" :value text)
573 (const :tag "Hand" :value hand)
574 (const :tag "Vertical dragger" :value vdrag)
575 (const :tag "Horizontal dragger" :value hdrag)
576 (const :tag "Same as mode line" :value modeline)
577 (const :tag "Hourglass" :value hourglass)))
578 (display-hourglass cursor boolean)
579 (hourglass-delay cursor number)
580 (resize-mini-windows
581 windows (choice
582 (const :tag "Off (nil)" :value nil)
583 (const :tag "Fit (t)" :value t)
584 (const :tag "Grow only" :value grow-only))
585 "25.1")
586 (display-raw-bytes-as-hex display boolean "26.1")
587 (display-line-numbers display-line-numbers
588 (choice
589 (const :tag "Off (nil)" :value nil)
590 (const :tag "Absolute line numbers"
591 :value t)
592 (const :tag "Relative line numbers"
593 :value relative)
594 (const :tag "Visually relative line numbers"
595 :value visual))
596 "26.1")
597 (display-line-numbers-width display-line-numbers
598 (choice
599 (const :tag "Dynamically computed"
600 :value nil)
601 (integer :menu-tag "Fixed number of columns"
602 :value 2
603 :format "%v"))
604 "26.1")
605 (display-line-numbers-current-absolute display-line-numbers
606 (choice
607 (const :tag "Display actual number of current line"
608 :value t)
609 (const :tag "Display zero as number of current line"
610 :value nil))
611 "26.1")
612 (display-line-numbers-widen display-line-numbers
613 (choice
614 (const :tag "Disregard narrowing when calculating line numbers"
615 :value t)
616 (const :tag "Count lines from beginning of narrowed region"
617 :value nil))
618 "26.1")
619 ;; xfaces.c
620 (scalable-fonts-allowed display boolean "22.1")
621 ;; xfns.c
622 (x-bitmap-file-path installation
623 (repeat (directory :format "%v")))
624 (x-gtk-use-old-file-dialog menu boolean "22.1")
625 (x-gtk-show-hidden-files menu boolean "22.1")
626 (x-gtk-file-dialog-help-text menu boolean "22.1")
627 (x-gtk-use-system-tooltips tooltip boolean "23.3")
628 ;; xterm.c
629 (x-use-underline-position-properties display boolean "22.1")
630 (x-underline-at-descent-line display boolean "22.1")
631 (x-stretch-cursor display boolean "21.1")
632 (scroll-bar-adjust-thumb-portion windows boolean "24.4")
633 ;; xselect.c
634 (x-select-enable-clipboard-manager killing boolean "24.1")
635 ;; xsettings.c
636 (font-use-system-font font-selection boolean "23.2")))
637 (setq ;; If we did not specify any standard value expression above,
638 ;; use the current value as the standard value.
639 standard (if (setq prop (memq :standard rest))
640 (cadr prop)
641 (if (default-boundp symbol)
642 (funcall quoter (default-value symbol))))
643 ;; Don't complain about missing variables which are
644 ;; irrelevant to this platform.
645 native-p (save-match-data
646 (cond
647 ((string-match "\\`dos-" (symbol-name symbol))
648 (eq system-type 'ms-dos))
649 ((string-match "\\`w32-" (symbol-name symbol))
650 (eq system-type 'windows-nt))
651 ((string-match "\\`ns-" (symbol-name symbol))
652 (featurep 'ns))
653 ((string-match "\\`x-.*gtk" (symbol-name symbol))
654 (featurep 'gtk))
655 ((string-match "clipboard-manager" (symbol-name symbol))
656 (boundp 'x-select-enable-clipboard-manager))
657 ((string-match "\\`x-" (symbol-name symbol))
658 (fboundp 'x-create-frame))
659 ((string-match "selection" (symbol-name symbol))
660 (fboundp 'x-selection-exists-p))
661 ((string-match "fringe" (symbol-name symbol))
662 (fboundp 'define-fringe-bitmap))
663 ((string-match "\\`imagemagick" (symbol-name symbol))
664 (fboundp 'imagemagick-types))
665 ((equal "font-use-system-font" (symbol-name symbol))
666 (featurep 'system-font-setting))
667 ;; Conditioned on x-create-frame, because that's
668 ;; the condition for loadup.el to preload tool-bar.el.
669 ((string-match "tool-bar-" (symbol-name symbol))
670 (fboundp 'x-create-frame))
671 ((equal "vertical-centering-font-regexp"
672 (symbol-name symbol))
673 ;; Any function from fontset.c will do.
674 (fboundp 'new-fontset))
675 ((equal "scroll-bar-adjust-thumb-portion"
676 (symbol-name symbol))
677 (featurep 'x))
678 (t t))))
679 (if (not (boundp symbol))
680 ;; If variables are removed from C code, give an error here!
681 (and native-p
682 (message "Note, built-in variable `%S' not bound" symbol))
683 ;; Save the standard value, unless we already did.
684 (or (get symbol 'standard-value)
685 (put symbol 'standard-value (list standard)))
686 ;; We need these properties independent of whether cus-start is loaded.
687 (if (setq prop (memq :safe rest))
688 (put symbol 'safe-local-variable (cadr prop)))
689 (if (setq prop (memq :risky rest))
690 (put symbol 'risky-local-variable (cadr prop)))
691 (if (setq prop (memq :set rest))
692 (put symbol 'custom-set (cadr prop)))
693 ;; Note this is the _only_ initialize property we handle.
694 (if (eq (cadr (memq :initialize rest)) 'custom-initialize-delay)
695 ;; These vars are defined early and should hence be initialized
696 ;; early, even if this file happens to be loaded late. so add them
697 ;; to the end of custom-delayed-init-variables. Otherwise,
698 ;; auto-save-file-name-transforms will appear in M-x customize-rogue.
699 (add-to-list 'custom-delayed-init-variables symbol 'append))
700 ;; If this is NOT while dumping Emacs, set up the rest of the
701 ;; customization info. This is the stuff that is not needed
702 ;; until someone does M-x customize etc.
703 (unless purify-flag
704 ;; Add it to the right group(s).
705 (if (listp group)
706 (dolist (g group)
707 (custom-add-to-group g symbol 'custom-variable))
708 (custom-add-to-group group symbol 'custom-variable))
709 ;; Set the type.
710 (put symbol 'custom-type type)
711 (if version (put symbol 'custom-version version))
712 (while rest
713 (setq prop (car rest)
714 propval (cadr rest)
715 rest (nthcdr 2 rest))
716 (cond ((memq prop '(:standard :risky :safe :set))) ; handled above
717 ((eq prop :tag)
718 (put symbol 'custom-tag propval))))))))
720 (custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start
721 'custom-variable)
723 ;; Record cus-start as loaded if we have set up all the info that we can.
724 ;; Don't record it as loaded if we have only set up the standard values
725 ;; and safe/risky properties.
726 (unless purify-flag
727 (provide 'cus-start))
729 ;;; cus-start.el ends here