Commit | Line | Data |
---|---|---|
1cd7adc6 | 1 | ;;; cus-start.el --- define customization properties of builtins |
976f7668 GM |
2 | |
3 | ;; Copyright (C) 1997, 1999-2012 Free Software Foundation, Inc. | |
4 | ||
1444b0c0 PA |
5 | ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> |
6 | ;; Keywords: internal | |
bd78fa1d | 7 | ;; Package: emacs |
1444b0c0 | 8 | |
c2383d2d RS |
9 | ;; This file is part of GNU Emacs. |
10 | ||
eb3fa2cf | 11 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
c2383d2d | 12 | ;; it under the terms of the GNU General Public License as published by |
eb3fa2cf GM |
13 | ;; the Free Software Foundation, either version 3 of the License, or |
14 | ;; (at your option) any later version. | |
c2383d2d RS |
15 | |
16 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;; GNU General Public License for more details. | |
20 | ||
21 | ;; You should have received a copy of the GNU General Public License | |
eb3fa2cf | 22 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
c2383d2d | 23 | |
1444b0c0 | 24 | ;;; Commentary: |
976f7668 | 25 | |
4883633e | 26 | ;; This file adds customize support for built-in variables. |
1444b0c0 | 27 | |
4883633e RS |
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. | |
1444b0c0 | 33 | |
4883633e | 34 | ;;; Code: |
1444b0c0 | 35 | |
0356de22 GM |
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 | |
e047f448 | 49 | (let ((all '(;; alloc.c |
1444b0c0 | 50 | (gc-cons-threshold alloc integer) |
2bc356d7 | 51 | (gc-cons-percentage alloc float) |
0f014aa1 | 52 | (garbage-collection-messages alloc boolean) |
1444b0c0 | 53 | ;; buffer.c |
e45db0fb | 54 | (mode-line-format mode-line sexp) ;Hard to do right. |
4e3b4528 | 55 | (major-mode internal function) |
1444b0c0 PA |
56 | (case-fold-search matching boolean) |
57 | (fill-column fill integer) | |
58 | (left-margin fill integer) | |
59 | (tab-width editing-basics integer) | |
60 | (ctl-arrow display boolean) | |
61 | (truncate-lines display boolean) | |
84975bbe | 62 | (word-wrap display boolean) |
1444b0c0 | 63 | (selective-display-ellipses display boolean) |
516b77a3 | 64 | (indicate-empty-lines fringe boolean) |
eb94dac6 LT |
65 | (indicate-buffer-boundaries |
66 | fringe | |
67 | (choice | |
68 | (const :tag "No indicators" nil) | |
69 | (const :tag "On left, with arrows" left) | |
70 | (const :tag "On right, with arrows" right) | |
a4fbb790 LT |
71 | (set :tag "Pick your own design" |
72 | :value ((t . nil)) | |
73 | :format "%{%t%}:\n%v\n%d" | |
74 | :doc "You can specify a default and then override it \ | |
75 | for individual indicators. | |
76 | Leaving \"Default\" unchecked is equivalent with specifying a default of | |
77 | \"Do not show\"." | |
78 | (choice :tag "Default" | |
79 | :value (t . nil) | |
80 | (const :tag "Do not show" (t . nil)) | |
81 | (const :tag "On the left" (t . left)) | |
82 | (const :tag "On the right" (t . right))) | |
83 | (choice :tag "Top" | |
84 | :value (top . left) | |
85 | (const :tag "Do not show" (top . nil)) | |
86 | (const :tag "On the left" (top . left)) | |
87 | (const :tag "On the right" (top . right))) | |
88 | (choice :tag "Bottom" | |
89 | :value (bottom . left) | |
90 | (const :tag "Do not show" (bottom . nil)) | |
91 | (const :tag "On the left" (bottom . left)) | |
92 | (const :tag "On the right" (bottom . right))) | |
93 | (choice :tag "Up arrow" | |
94 | :value (up . left) | |
95 | (const :tag "Do not show" (up . nil)) | |
96 | (const :tag "On the left" (up . left)) | |
97 | (const :tag "On the right" (up . right))) | |
98 | (choice :tag "Down arrow" | |
99 | :value (down . left) | |
100 | (const :tag "Do not show" (down . nil)) | |
101 | (const :tag "On the left" (down . left)) | |
102 | (const :tag "On the right" (down . right)))) | |
516b77a3 | 103 | (other :tag "On left, no arrows" t))) |
c6d57325 RS |
104 | (scroll-up-aggressively windows |
105 | (choice (const :tag "off" nil) number) | |
106 | "21.1") | |
107 | (scroll-down-aggressively windows | |
108 | (choice (const :tag "off" nil) number) | |
109 | "21.1") | |
6671cab3 MR |
110 | (line-spacing display (choice (const :tag "none" nil) integer) |
111 | "22.1") | |
ec514007 | 112 | (cursor-in-non-selected-windows |
c8c59954 GM |
113 | cursor boolean nil |
114 | :tag "Cursor In Non-selected Windows" | |
e9c8529f GM |
115 | :set (lambda (symbol value) |
116 | (set-default symbol value) | |
117 | (force-mode-line-update t))) | |
9d794026 | 118 | (transient-mark-mode editing-basics boolean nil |
c8c59954 | 119 | :standard (not noninteractive) |
88f43c67 GM |
120 | :initialize custom-initialize-delay |
121 | :set custom-set-minor-mode) | |
b177498a EZ |
122 | (bidi-paragraph-direction |
123 | paragraphs | |
124 | (choice | |
125 | (const :tag "Left to Right" left-to-right) | |
126 | (const :tag "Right to Left" right-to-left) | |
904215d2 EZ |
127 | (const :tag "Dynamic, according to paragraph text" nil)) |
128 | "24.1") | |
1444b0c0 PA |
129 | ;; callint.c |
130 | (mark-even-if-inactive editing-basics boolean) | |
131 | ;; callproc.c | |
132 | (shell-file-name execute file) | |
133 | (exec-path execute | |
f747a488 | 134 | (repeat (choice (const :tag "default directory" nil) |
72e869ba | 135 | (directory :format "%v")))) |
2bc356d7 | 136 | (exec-suffixes execute (repeat string)) |
5e3097cd | 137 | ;; charset.c |
c11f69e1 KH |
138 | (charset-map-path installation |
139 | (repeat (directory :format "%v"))) | |
5fc9eb7c DL |
140 | ;; coding.c |
141 | (inhibit-eol-conversion mule boolean) | |
de0d1fc5 | 142 | (eol-mnemonic-undecided mule string) |
57c3bd01 GM |
143 | ;; startup.el fiddles with the values. IMO, would be |
144 | ;; simpler to just use #ifdefs in coding.c. | |
145 | (eol-mnemonic-unix mule string nil | |
146 | :standard | |
147 | (if (memq system-type '(ms-dos windows-nt)) | |
148 | "(Unix)" ":")) | |
149 | (eol-mnemonic-dos mule string nil | |
150 | :standard | |
151 | (if (memq system-type '(ms-dos windows-nt)) | |
152 | "\\" "(DOS)")) | |
153 | (eol-mnemonic-mac mule string nil | |
154 | :standard "(Mac)") | |
13eb63ff DL |
155 | (file-coding-system-alist |
156 | mule | |
157 | (alist | |
158 | :key-type (regexp :tag "File regexp") | |
159 | :value-type (choice | |
160 | :value (undecided . undecided) | |
161 | (cons :tag "Encoding/decoding pair" | |
162 | :value (undecided . undecided) | |
163 | (coding-system :tag "Decoding") | |
164 | (coding-system :tag "Encoding")) | |
70c2811c KY |
165 | (coding-system |
166 | :tag "Single coding system" | |
167 | :value undecided | |
168 | :match (lambda (widget value) | |
169 | (and value (not (functionp value))))) | |
13eb63ff | 170 | (function :value ignore)))) |
1444b0c0 | 171 | ;; dired.c |
71296446 | 172 | (completion-ignored-extensions dired |
1444b0c0 | 173 | (repeat (string :format "%v"))) |
0849a37e | 174 | ;; dispnew.c |
1444b0c0 PA |
175 | (baud-rate display integer) |
176 | (inverse-video display boolean) | |
177 | (visible-bell display boolean) | |
178 | (no-redraw-on-reenter display boolean) | |
2bc356d7 CY |
179 | |
180 | ;; dosfns.c | |
181 | (dos-display-scancodes display boolean) | |
182 | (dos-hyper-key keyboard integer) | |
183 | (dos-super-key keyboard integer) | |
184 | (dos-keypad-mode keyboard integer) | |
185 | ||
1444b0c0 PA |
186 | ;; editfns.c |
187 | (user-full-name mail string) | |
188 | ;; eval.c | |
189 | (max-specpdl-size limits integer) | |
190 | (max-lisp-eval-depth limits integer) | |
f8add097 RS |
191 | (max-mini-window-height limits |
192 | (choice (const :tag "quarter screen" nil) | |
6671cab3 | 193 | number) "23.1") |
71296446 | 194 | (debug-on-error debug |
1444b0c0 PA |
195 | (choice (const :tag "off") |
196 | (repeat :menu-tag "When" | |
197 | :value (nil) | |
198 | (symbol :format "%v")) | |
199 | (const :tag "always" t))) | |
200 | (debug-ignored-errors debug (repeat (choice symbol regexp))) | |
21ce8245 | 201 | (debug-on-quit debug boolean) |
2bc356d7 CY |
202 | (debug-on-signal debug boolean) |
203 | ;; fileio.c | |
204 | (delete-by-moving-to-trash auto-save boolean "23.1") | |
6ba7a6f0 | 205 | (auto-save-visited-file-name auto-save boolean) |
e088c02a | 206 | ;; filelock.c |
2a1e2476 | 207 | (create-lockfiles files boolean "24.3") |
e088c02a GM |
208 | (temporary-file-directory |
209 | ;; Darwin section added 24.1, does not seem worth :version bump. | |
210 | files directory nil | |
c8c59954 | 211 | :standard |
e088c02a GM |
212 | (file-name-as-directory |
213 | ;; FIXME ? Should there be Ftemporary_file_directory to do this | |
214 | ;; more robustly (cf set_local_socket in emacsclient.c). | |
215 | ;; It could be used elsewhere, eg Fcall_process_region, | |
216 | ;; server-socket-dir. See bug#7135. | |
217 | (cond ((memq system-type '(ms-dos windows-nt)) | |
218 | (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") | |
219 | "c:/temp")) | |
220 | ((eq system-type 'darwin) | |
221 | (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") | |
222 | ;; See bug#7135. | |
223 | (let ((tmp (ignore-errors | |
224 | (shell-command-to-string | |
225 | "getconf DARWIN_USER_TEMP_DIR")))) | |
226 | (and (stringp tmp) | |
227 | (setq tmp (replace-regexp-in-string | |
228 | "\n\\'" "" tmp)) | |
229 | ;; Handles "getconf: Unrecognized variable..." | |
230 | (file-directory-p tmp) | |
231 | tmp)) | |
232 | "/tmp")) | |
233 | (t | |
234 | (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") | |
235 | "/tmp")))) | |
236 | :initialize custom-initialize-delay) | |
78976e0a | 237 | ;; fns.c |
37328bcd | 238 | (use-dialog-box menu boolean "21.1") |
bf247b6e | 239 | (use-file-dialog menu boolean "22.1") |
f4c307a5 | 240 | (focus-follows-mouse frames boolean "20.3") |
2bc356d7 CY |
241 | ;; fontset.c |
242 | (vertical-centering-font-regexp display regexp) | |
1444b0c0 PA |
243 | ;; frame.c |
244 | (default-frame-alist frames | |
245 | (repeat (cons :format "%v" | |
246 | (symbol :tag "Parameter") | |
247 | (sexp :tag "Value")))) | |
140fb7ff KS |
248 | (mouse-highlight mouse (choice (const :tag "disabled" nil) |
249 | (const :tag "always shown" t) | |
6671cab3 MR |
250 | (other :tag "hidden by keypress" 1)) |
251 | "22.1") | |
e044e4fc | 252 | (make-pointer-invisible mouse boolean "23.2") |
c8c59954 | 253 | (menu-bar-mode frames boolean nil |
88f43c67 GM |
254 | ;; FIXME? |
255 | ; :initialize custom-initialize-default | |
256 | :set custom-set-minor-mode) | |
c8c59954 | 257 | (tool-bar-mode (frames mouse) boolean nil |
88f43c67 GM |
258 | ; :initialize custom-initialize-default |
259 | :set custom-set-minor-mode) | |
48d707c5 | 260 | ;; fringe.c |
516b77a3 | 261 | (overflow-newline-into-fringe fringe boolean) |
af008560 GM |
262 | ;; image.c |
263 | (imagemagick-render-type image integer "24.1") | |
1444b0c0 | 264 | ;; indent.c |
01892a52 | 265 | (indent-tabs-mode indent boolean) |
1444b0c0 PA |
266 | ;; keyboard.c |
267 | (meta-prefix-char keyboard character) | |
268 | (auto-save-interval auto-save integer) | |
269 | (auto-save-timeout auto-save (choice (const :tag "off" nil) | |
270 | (integer :format "%v"))) | |
ac1b1728 | 271 | (echo-keystrokes minibuffer number) |
1444b0c0 | 272 | (polling-period keyboard integer) |
4db2b1c7 RS |
273 | (double-click-time mouse (restricted-sexp |
274 | :match-alternatives (integerp 'nil 't))) | |
6671cab3 | 275 | (double-click-fuzz mouse integer "22.1") |
1444b0c0 PA |
276 | (inhibit-local-menu-bar-menus menu boolean) |
277 | (help-char keyboard character) | |
278 | (help-event-list keyboard (repeat (sexp :format "%v"))) | |
279 | (menu-prompting menu boolean) | |
9852377f | 280 | (select-active-regions killing |
7c23dd44 CY |
281 | (choice (const :tag "always" t) |
282 | (const :tag "only shift-selection or mouse-drag" only) | |
9852377f CY |
283 | (const :tag "off" nil)) |
284 | "24.1") | |
0438ce91 DC |
285 | (debug-on-event debug |
286 | (choice (const :tag "None" nil) | |
287 | (const :tag "When sent SIGUSR1" sigusr1) | |
288 | (const :tag "When sent SIGUSR2" sigusr2)) | |
289 | "24.1") | |
5f537e54 | 290 | |
37328bcd DL |
291 | ;; This is not good news because it will use the wrong |
292 | ;; version-specific directories when you upgrade. We need | |
293 | ;; customization of the front of the list, maintaining the standard | |
294 | ;; value intact at the back. | |
71296446 | 295 | ;;; (load-path environment |
37328bcd DL |
296 | ;;; (repeat (choice :tag "[Current dir?]" |
297 | ;;; :format "%[Current dir?%] %v" | |
298 | ;;; (const :tag " current dir" nil) | |
299 | ;;; (directory :format "%v")))) | |
1444b0c0 | 300 | ;; minibuf.c |
1444b0c0 | 301 | (enable-recursive-minibuffers minibuffer boolean) |
408f56b2 | 302 | (history-length minibuffer |
6671cab3 MR |
303 | (choice (const :tag "Infinite" t) integer) |
304 | "22.1") | |
305 | (history-delete-duplicates minibuffer boolean "22.1") | |
ed278e5d CY |
306 | (read-buffer-completion-ignore-case minibuffer boolean "23.1") |
307 | ||
8f62f2b8 MB |
308 | (minibuffer-prompt-properties |
309 | minibuffer | |
310 | (list | |
311 | (checklist :inline t | |
312 | (const :tag "Read-Only" | |
313 | :doc "Prevent prompt from being modified" | |
314 | :format "%t%n%h" | |
315 | :inline t | |
316 | (read-only t)) | |
c9133fa6 | 317 | (const :tag "Don't Enter" |
8f62f2b8 MB |
318 | :doc "Prevent point from ever entering prompt" |
319 | :format "%t%n%h" | |
320 | :inline t | |
321 | (point-entered minibuffer-avoid-prompt))) | |
322 | (repeat :inline t | |
323 | :tag "Other Properties" | |
324 | (list :inline t | |
325 | :format "%v" | |
326 | (symbol :tag "Property") | |
ecf5279a DL |
327 | (sexp :tag "Value")))) |
328 | "21.1") | |
1444b0c0 | 329 | (minibuffer-auto-raise minibuffer boolean) |
ecf5279a | 330 | ;; options property set at end |
a8a1b05d DL |
331 | (read-buffer-function minibuffer |
332 | (choice (const nil) | |
333 | (function-item iswitchb-read-buffer) | |
334 | function)) | |
b78fba02 EZ |
335 | ;; msdos.c |
336 | (dos-unsupported-char-glyph display integer) | |
bc9ebf41 | 337 | ;; nsterm.m |
77346ecd | 338 | (ns-control-modifier |
ae2349fe | 339 | ns |
bc9ebf41 DR |
340 | (choice (const :tag "No modifier" nil) |
341 | (const control) (const meta) | |
342 | (const alt) (const hyper) | |
343 | (const super)) "23.1") | |
b7d1e144 JD |
344 | (ns-right-control-modifier |
345 | ns | |
346 | (choice (const :tag "No modifier (work as control)" none) | |
347 | (const :tag "Use the value of ns-control-modifier" | |
348 | left) | |
349 | (const control) (const meta) | |
350 | (const alt) (const hyper) | |
351 | (const super)) "24.0") | |
77346ecd | 352 | (ns-command-modifier |
ae2349fe | 353 | ns |
bc9ebf41 DR |
354 | (choice (const :tag "No modifier" nil) |
355 | (const control) (const meta) | |
356 | (const alt) (const hyper) | |
357 | (const super)) "23.1") | |
b7d1e144 JD |
358 | (ns-right-command-modifier |
359 | ns | |
360 | (choice (const :tag "No modifier (work as command)" none) | |
361 | (const :tag "Use the value of ns-command-modifier" | |
362 | left) | |
363 | (const control) (const meta) | |
364 | (const alt) (const hyper) | |
365 | (const super)) "24.0") | |
77346ecd | 366 | (ns-alternate-modifier |
ae2349fe | 367 | ns |
bc9ebf41 DR |
368 | (choice (const :tag "No modifier (work as alternate/option)" none) |
369 | (const control) (const meta) | |
370 | (const alt) (const hyper) | |
371 | (const super)) "23.1") | |
a2e35ef5 JD |
372 | (ns-right-alternate-modifier |
373 | ns | |
374 | (choice (const :tag "No modifier (work as alternate/option)" none) | |
375 | (const :tag "Use the value of ns-alternate-modifier" | |
376 | left) | |
377 | (const control) (const meta) | |
378 | (const alt) (const hyper) | |
379 | (const super)) "23.3") | |
77346ecd | 380 | (ns-function-modifier |
ae2349fe | 381 | ns |
bc9ebf41 DR |
382 | (choice (const :tag "No modifier (work as function)" none) |
383 | (const control) (const meta) | |
384 | (const alt) (const hyper) | |
385 | (const super)) "23.1") | |
386 | (ns-antialias-text ns boolean "23.1") | |
5ffb62aa | 387 | (ns-auto-hide-menu-bar ns boolean "24.0") |
1444b0c0 | 388 | ;; process.c |
4883633e | 389 | (delete-exited-processes processes-basics boolean) |
1444b0c0 PA |
390 | ;; syntax.c |
391 | (parse-sexp-ignore-comments editing-basics boolean) | |
392 | (words-include-escapes editing-basics boolean) | |
6b61353c KH |
393 | (open-paren-in-column-0-is-defun-start editing-basics boolean |
394 | "21.1") | |
98e071b5 SM |
395 | ;; term.c |
396 | (visible-cursor cursor boolean "22.1") | |
0f08b956 LT |
397 | ;; undo.c |
398 | (undo-limit undo integer) | |
399 | (undo-strong-limit undo integer) | |
400 | (undo-outer-limit undo | |
401 | (choice integer | |
402 | (const :tag "No limit" | |
403 | :format "%t\n%d" | |
404 | :doc | |
405 | "With this choice, \ | |
406 | the undo info for the current command never gets discarded. | |
407 | This should only be chosen under exceptional circumstances, | |
408 | since it could result in memory overflow and make Emacs crash." | |
409 | nil)) | |
410 | "22.1") | |
1444b0c0 | 411 | ;; window.c |
4cb464b7 | 412 | (temp-buffer-show-function windows (choice (const nil) function)) |
74f54b54 | 413 | (next-screen-context-lines windows integer) |
7704b6b1 KS |
414 | (scroll-preserve-screen-position |
415 | windows (choice | |
416 | (const :tag "Off (nil)" :value nil) | |
417 | (const :tag "Full screen (t)" :value t) | |
6671cab3 | 418 | (other :tag "Always" 1)) "22.1") |
562dd5e9 MR |
419 | (recenter-redisplay |
420 | windows (choice | |
421 | (const :tag "Never (nil)" :value nil) | |
422 | (const :tag "Only on ttys" :value tty) | |
423 | (other :tag "Always" t)) "23.1") | |
a0c2d0ae | 424 | (window-combination-resize windows boolean "24.1") |
8e17c9ba MR |
425 | (window-combination-limit |
426 | windows (choice | |
427 | (const :tag "Never (nil)" :value nil) | |
428 | (const :tag "For Temp Buffer Resize mode (temp-buffer-resize)" | |
429 | :value temp-buffer-resize) | |
430 | (const :tag "For temporary buffers (temp-buffer)" | |
431 | :value temp-buffer) | |
432 | (const :tag "For buffer display (display-buffer)" | |
433 | :value display-buffer) | |
434 | (other :tag "Always (t)" :value t)) | |
435 | "24.3") | |
1444b0c0 | 436 | ;; xdisp.c |
c8c59954 | 437 | (show-trailing-whitespace whitespace-faces boolean nil |
ec514007 | 438 | :safe booleanp) |
1444b0c0 | 439 | (scroll-step windows integer) |
ccbb360e RS |
440 | (scroll-conservatively windows integer) |
441 | (scroll-margin windows integer) | |
4e371ce8 EZ |
442 | (hscroll-margin windows integer "22.1") |
443 | (hscroll-step windows number "22.1") | |
3a66cc91 | 444 | (truncate-partial-width-windows display boolean "23.1") |
2bc356d7 | 445 | (make-cursor-line-fully-visible windows boolean) |
e45db0fb | 446 | (mode-line-in-non-selected-windows mode-line boolean "22.1") |
37328bcd DL |
447 | (line-number-display-limit display |
448 | (choice integer | |
449 | (const :tag "No limit" nil))) | |
6671cab3 | 450 | (line-number-display-limit-width display integer "22.1") |
1444b0c0 PA |
451 | (highlight-nonselected-windows display boolean) |
452 | (message-log-max debug (choice (const :tag "Disable" nil) | |
453 | (integer :menu-tag "lines" | |
454 | :format "%v") | |
79221864 | 455 | (other :tag "Unlimited" t))) |
daba3e25 | 456 | (unibyte-display-via-language-environment mule boolean) |
bf247b6e | 457 | (blink-cursor-alist cursor alist "22.1") |
03c25271 | 458 | (overline-margin display integer "22.1") |
2a3bd2e1 | 459 | (underline-minimum-offset display integer "23.1") |
612c16f1 CY |
460 | (mouse-autoselect-window |
461 | display (choice | |
462 | (const :tag "Off (nil)" :value nil) | |
463 | (const :tag "Immediate" :value t) | |
464 | (number :tag "Delay by secs" :value 0.5)) "22.1") | |
f904c0f9 JD |
465 | (tool-bar-style |
466 | frames (choice | |
467 | (const :tag "Images" :value image) | |
468 | (const :tag "Text" :value text) | |
469 | (const :tag "Both" :value both) | |
470 | (const :tag "Both-horiz" :value both-horiz) | |
8a52f00a | 471 | (const :tag "Text-image-horiz" :value text-image-horiz) |
0c3461de GM |
472 | (const :tag "System default" :value nil)) "24.1") |
473 | (tool-bar-max-label-size frames integer "24.1") | |
ec514007 | 474 | (auto-hscroll-mode scrolling boolean "21.1") |
2bc356d7 CY |
475 | (void-text-area-pointer cursor |
476 | (choice | |
477 | (const :tag "Standard (text pointer)" :value nil) | |
478 | (const :tag "Arrow" :value arrow) | |
479 | (const :tag "Text pointer" :value text) | |
480 | (const :tag "Hand" :value hand) | |
481 | (const :tag "Vertical dragger" :value vdrag) | |
482 | (const :tag "Horizontal dragger" :value hdrag) | |
483 | (const :tag "Same as mode line" :value modeline) | |
484 | (const :tag "Hourglass" :value hourglass))) | |
ec514007 GM |
485 | (display-hourglass cursor boolean) |
486 | (hourglass-delay cursor number) | |
f904c0f9 | 487 | |
e5f51929 | 488 | ;; xfaces.c |
2bc356d7 | 489 | (font-list-limit display integer) |
6671cab3 | 490 | (scalable-fonts-allowed display boolean "22.1") |
1444b0c0 PA |
491 | ;; xfns.c |
492 | (x-bitmap-file-path installation | |
0849a37e | 493 | (repeat (directory :format "%v"))) |
c4823934 | 494 | (x-gtk-use-old-file-dialog menu boolean "22.1") |
91b5a204 | 495 | (x-gtk-show-hidden-files menu boolean "22.1") |
c4823934 | 496 | (x-gtk-file-dialog-help-text menu boolean "22.1") |
0dd95b49 | 497 | (x-gtk-whole-detached-tool-bar x boolean "22.1") |
aa1859f5 | 498 | (x-gtk-use-system-tooltips tooltip boolean "23.3") |
0849a37e | 499 | ;; xterm.c |
4e371ce8 | 500 | (x-use-underline-position-properties display boolean "22.1") |
03c25271 | 501 | (x-underline-at-descent-line display boolean "22.1") |
dfb3c4c6 | 502 | (x-stretch-cursor display boolean "21.1") |
c1ca42b4 CY |
503 | ;; xselect.c |
504 | (x-select-enable-clipboard-manager killing boolean "24.1") | |
dfb3c4c6 JD |
505 | ;; xsettings.c |
506 | (font-use-system-font font-selection boolean "23.2"))) | |
ec514007 | 507 | this symbol group type standard version native-p rest prop propval |
4883633e RS |
508 | ;; This function turns a value |
509 | ;; into an expression which produces that value. | |
510 | (quoter (lambda (sexp) | |
511 | (if (or (memq sexp '(t nil)) | |
017266f8 | 512 | (keywordp sexp) |
4883633e RS |
513 | (and (listp sexp) |
514 | (memq (car sexp) '(lambda))) | |
515 | (stringp sexp) | |
37328bcd | 516 | (numberp sexp)) |
4883633e RS |
517 | sexp |
518 | (list 'quote sexp))))) | |
71296446 | 519 | (while all |
1444b0c0 PA |
520 | (setq this (car all) |
521 | all (cdr all) | |
522 | symbol (nth 0 this) | |
523 | group (nth 1 this) | |
00377857 | 524 | type (nth 2 this) |
37328bcd | 525 | version (nth 3 this) |
c8c59954 | 526 | rest (nthcdr 4 this) |
a200d998 RS |
527 | ;; If we did not specify any standard value expression above, |
528 | ;; use the current value as the standard value. | |
c8c59954 GM |
529 | standard (if (setq prop (memq :standard rest)) |
530 | (cadr prop) | |
531 | (if (default-boundp symbol) | |
532 | (funcall quoter (default-value symbol)))) | |
00377857 EZ |
533 | ;; Don't complain about missing variables which are |
534 | ;; irrelevant to this platform. | |
535 | native-p (save-match-data | |
536 | (cond | |
537 | ((string-match "\\`dos-" (symbol-name symbol)) | |
538 | (eq system-type 'ms-dos)) | |
539 | ((string-match "\\`w32-" (symbol-name symbol)) | |
540 | (eq system-type 'windows-nt)) | |
77346ecd EZ |
541 | ((string-match "\\`ns-" (symbol-name symbol)) |
542 | (featurep 'ns)) | |
2702394e | 543 | ((string-match "\\`x-.*gtk" (symbol-name symbol)) |
79cf2123 | 544 | (featurep 'gtk)) |
78e8b10a CY |
545 | ((string-match "clipboard-manager" (symbol-name symbol)) |
546 | (boundp 'x-select-enable-clipboard-manager)) | |
197a09bf EZ |
547 | ((string-match "\\`x-" (symbol-name symbol)) |
548 | (fboundp 'x-create-frame)) | |
6eb33acb EZ |
549 | ((string-match "selection" (symbol-name symbol)) |
550 | (fboundp 'x-selection-exists-p)) | |
551 | ((string-match "fringe" (symbol-name symbol)) | |
552 | (fboundp 'define-fringe-bitmap)) | |
af008560 GM |
553 | ((string-match "\\`imagemagick" (symbol-name symbol)) |
554 | (fboundp 'imagemagick-types)) | |
8b571bf3 JD |
555 | ((equal "font-use-system-font" (symbol-name symbol)) |
556 | (featurep 'system-font-setting)) | |
c0162ade EZ |
557 | ;; Conditioned on x-create-frame, because that's |
558 | ;; the condition for loadup.el to preload tool-bar.el. | |
559 | ((string-match "tool-bar-" (symbol-name symbol)) | |
560 | (fboundp 'x-create-frame)) | |
f31237a4 EZ |
561 | ((equal "vertical-centering-font-regexp" |
562 | (symbol-name symbol)) | |
563 | ;; Any function from fontset.c will do. | |
564 | (fboundp 'new-fontset)) | |
00377857 | 565 | (t t)))) |
1444b0c0 PA |
566 | (if (not (boundp symbol)) |
567 | ;; If variables are removed from C code, give an error here! | |
00377857 EZ |
568 | (and native-p |
569 | (message "Note, built-in variable `%S' not bound" symbol)) | |
4883633e RS |
570 | ;; Save the standard value, unless we already did. |
571 | (or (get symbol 'standard-value) | |
a200d998 | 572 | (put symbol 'standard-value (list standard))) |
ec514007 GM |
573 | ;; We need these properties independent of whether cus-start is loaded. |
574 | (if (setq prop (memq :safe rest)) | |
575 | (put symbol 'safe-local-variable (cadr prop))) | |
576 | (if (setq prop (memq :risky rest)) | |
577 | (put symbol 'risky-local-variable (cadr prop))) | |
88f43c67 GM |
578 | (if (setq prop (memq :set rest)) |
579 | (put symbol 'custom-set (cadr prop))) | |
9d794026 GM |
580 | ;; Note this is the _only_ initialize property we handle. |
581 | (if (eq (cadr (memq :initialize rest)) 'custom-initialize-delay) | |
582 | (push symbol custom-delayed-init-variables)) | |
88f43c67 GM |
583 | ;; If this is NOT while dumping Emacs, set up the rest of the |
584 | ;; customization info. This is the stuff that is not needed | |
585 | ;; until someone does M-x customize etc. | |
4883633e | 586 | (unless purify-flag |
9d794026 GM |
587 | ;; Add it to the right group(s). |
588 | (if (listp group) | |
589 | (dolist (g group) | |
590 | (custom-add-to-group g symbol 'custom-variable)) | |
591 | (custom-add-to-group group symbol 'custom-variable)) | |
4883633e | 592 | ;; Set the type. |
37328bcd | 593 | (put symbol 'custom-type type) |
c8c59954 | 594 | (if version (put symbol 'custom-version version)) |
ec514007 GM |
595 | (while rest |
596 | (setq prop (car rest) | |
597 | propval (cadr rest) | |
598 | rest (nthcdr 2 rest)) | |
c8c59954 | 599 | (cond ((memq prop '(:standard :risky :safe :set))) ; handled above |
ec514007 GM |
600 | ((eq prop :tag) |
601 | (put symbol 'custom-tag propval)))))))) | |
4883633e | 602 | |
ecf5279a | 603 | (custom-add-to-group 'iswitchb 'read-buffer-function 'custom-variable) |
6b61353c KH |
604 | (custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start |
605 | 'custom-variable) | |
ecf5279a | 606 | |
ec514007 GM |
607 | ;; Record cus-start as loaded if we have set up all the info that we can. |
608 | ;; Don't record it as loaded if we have only set up the standard values | |
609 | ;; and safe/risky properties. | |
4883633e RS |
610 | (unless purify-flag |
611 | (provide 'cus-start)) | |
1444b0c0 | 612 | |
1cd7adc6 | 613 | ;;; cus-start.el ends here |