1 ;;; cus-start.el --- define customization properties of builtins
3 ;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004,
4 ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
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/>.
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.
36 (let ((all '(;; alloc.c
37 (gc-cons-threshold alloc integer
)
38 (garbage-collection-messages alloc boolean
)
40 (mode-line-format mode-line sexp
) ;Hard to do right.
41 (default-major-mode internal function
)
42 (enable-multibyte-characters mule boolean
)
43 (case-fold-search matching boolean
)
44 (fill-column fill integer
)
45 (left-margin fill integer
)
46 (tab-width editing-basics integer
)
47 (ctl-arrow display boolean
)
48 (truncate-lines display boolean
)
49 (selective-display-ellipses display boolean
)
50 (indicate-empty-lines fringe boolean
)
51 (indicate-buffer-boundaries
54 (const :tag
"No indicators" nil
)
55 (const :tag
"On left, with arrows" left
)
56 (const :tag
"On right, with arrows" right
)
57 (set :tag
"Pick your own design"
59 :format
"%{%t%}:\n%v\n%d"
60 :doc
"You can specify a default and then override it \
61 for individual indicators.
62 Leaving \"Default\" unchecked is equivalent with specifying a default of
64 (choice :tag
"Default"
66 (const :tag
"Do not show" (t . nil
))
67 (const :tag
"On the left" (t . left
))
68 (const :tag
"On the right" (t . right
)))
71 (const :tag
"Do not show" (top . nil
))
72 (const :tag
"On the left" (top . left
))
73 (const :tag
"On the right" (top . right
)))
75 :value
(bottom . left
)
76 (const :tag
"Do not show" (bottom . nil
))
77 (const :tag
"On the left" (bottom . left
))
78 (const :tag
"On the right" (bottom . right
)))
79 (choice :tag
"Up arrow"
81 (const :tag
"Do not show" (up . nil
))
82 (const :tag
"On the left" (up . left
))
83 (const :tag
"On the right" (up . right
)))
84 (choice :tag
"Down arrow"
86 (const :tag
"Do not show" (down . nil
))
87 (const :tag
"On the left" (down . left
))
88 (const :tag
"On the right" (down . right
))))
89 (other :tag
"On left, no arrows" t
)))
90 (scroll-up-aggressively windows
91 (choice (const :tag
"off" nil
) number
)
93 (scroll-down-aggressively windows
94 (choice (const :tag
"off" nil
) number
)
96 (line-spacing display
(choice (const :tag
"none" nil
) integer
)
99 (mark-even-if-inactive editing-basics boolean
)
101 (shell-file-name execute file
)
103 (repeat (choice (const :tag
"default directory" nil
)
104 (directory :format
"%v"))))
106 (charset-map-path installation
107 (repeat (directory :format
"%v")))
109 (inhibit-eol-conversion mule boolean
)
110 (eol-mnemonic-undecided mule string
)
111 (eol-mnemonic-unix mule string
)
112 (eol-mnemonic-dos mule string
)
113 (eol-mnemonic-mac mule string
)
114 (file-coding-system-alist
117 :key-type
(regexp :tag
"File regexp")
119 :value
(undecided . undecided
)
120 (cons :tag
"Encoding/decoding pair"
121 :value
(undecided . undecided
)
122 (coding-system :tag
"Decoding")
123 (coding-system :tag
"Encoding"))
125 :tag
"Single coding system"
127 :match
(lambda (widget value
)
128 (and value
(not (functionp value
)))))
129 (function :value ignore
))))
131 (completion-ignored-extensions dired
132 (repeat (string :format
"%v")))
134 (baud-rate display integer
)
135 (inverse-video display boolean
)
136 (visible-bell display boolean
)
137 (no-redraw-on-reenter display boolean
)
139 (user-full-name mail string
)
141 (max-specpdl-size limits integer
)
142 (max-lisp-eval-depth limits integer
)
143 (max-mini-window-height limits
144 (choice (const :tag
"quarter screen" nil
)
146 (stack-trace-on-error debug
147 (choice (const :tag
"off")
148 (repeat :menu-tag
"When"
150 (symbol :format
"%v"))
151 (const :tag
"always" t
)))
152 (debug-on-error debug
153 (choice (const :tag
"off")
154 (repeat :menu-tag
"When"
156 (symbol :format
"%v"))
157 (const :tag
"always" t
)))
158 (debug-ignored-errors debug
(repeat (choice symbol regexp
)))
160 (choice (const :tag
"off")
161 (repeat :menu-tag
"When"
163 (symbol :format
"%v"))
164 (const :tag
"always" t
)))
166 (use-dialog-box menu boolean
"21.1")
167 (use-file-dialog menu boolean
"22.1")
168 (focus-follows-mouse frames boolean
"20.3")
170 (default-frame-alist frames
171 (repeat (cons :format
"%v"
172 (symbol :tag
"Parameter")
173 (sexp :tag
"Value"))))
174 (mouse-highlight mouse
(choice (const :tag
"disabled" nil
)
175 (const :tag
"always shown" t
)
176 (other :tag
"hidden by keypress" 1))
179 (overflow-newline-into-fringe fringe boolean
)
181 (indent-tabs-mode indent boolean
)
183 (meta-prefix-char keyboard character
)
184 (auto-save-interval auto-save integer
)
185 (auto-save-timeout auto-save
(choice (const :tag
"off" nil
)
186 (integer :format
"%v")))
187 (echo-keystrokes minibuffer number
)
188 (polling-period keyboard integer
)
189 (double-click-time mouse
(restricted-sexp
190 :match-alternatives
(integerp 'nil
't
)))
191 (double-click-fuzz mouse integer
"22.1")
192 (inhibit-local-menu-bar-menus menu boolean
)
193 (help-char keyboard character
)
194 (help-event-list keyboard
(repeat (sexp :format
"%v")))
195 (menu-prompting menu boolean
)
196 (suggest-key-bindings keyboard
(choice (const :tag
"off" nil
)
197 (integer :tag
"time" 2)
200 (mac-dnd-known-types mac
(repeat string
) "22.1")
202 (mac-control-modifier mac
(choice (const :tag
"No modifier" nil
)
203 (const control
) (const meta
)
204 (const alt
) (const hyper
)
205 (const super
)) "22.1")
206 (mac-command-modifier mac
(choice (const :tag
"No modifier" nil
)
207 (const control
) (const meta
)
208 (const alt
) (const hyper
)
209 (const super
)) "22.1")
210 (mac-option-modifier mac
(choice (const :tag
"No modifier (work as option)" nil
)
211 (const control
) (const meta
)
212 (const alt
) (const hyper
)
213 (const super
)) "22.1")
214 (mac-function-modifier mac
215 (choice (const :tag
"No modifier (work as function)" nil
)
216 (const control
) (const meta
)
217 (const alt
) (const hyper
)
218 (const super
)) "22.1")
219 (mac-emulate-three-button-mouse mac
220 (choice (const :tag
"No emulation" nil
)
221 (const :tag
"Option->2, Command->3" t
)
222 (const :tag
"Command->2, Option->3" reverse
))
224 (mac-wheel-button-is-mouse-2 mac boolean
"22.1")
225 (mac-pass-command-to-system mac boolean
"22.1")
226 (mac-pass-control-to-system mac boolean
"22.1")
227 (mac-allow-anti-aliasing mac boolean
"22.1")
228 (mac-ts-script-language-on-focus mac
229 (choice (const :tag
"System default behavior" nil
)
230 (const :tag
"Restore to script/language used in the last focus frame" t
)
231 (cons :tag
"Specify script/language"
232 (integer :tag
"Script code")
233 (integer :tag
"Language code")))
236 ;; This is not good news because it will use the wrong
237 ;; version-specific directories when you upgrade. We need
238 ;; customization of the front of the list, maintaining the standard
239 ;; value intact at the back.
240 ;;; (load-path environment
241 ;;; (repeat (choice :tag "[Current dir?]"
242 ;;; :format "%[Current dir?%] %v"
243 ;;; (const :tag " current dir" nil)
244 ;;; (directory :format "%v"))))
246 (enable-recursive-minibuffers minibuffer boolean
)
247 (history-length minibuffer
248 (choice (const :tag
"Infinite" t
) integer
)
250 (history-delete-duplicates minibuffer boolean
"22.1")
251 (minibuffer-prompt-properties
255 (const :tag
"Read-Only"
256 :doc
"Prevent prompt from being modified"
260 (const :tag
"Don't Enter"
261 :doc
"Prevent point from ever entering prompt"
264 (point-entered minibuffer-avoid-prompt
)))
266 :tag
"Other Properties"
269 (symbol :tag
"Property")
270 (sexp :tag
"Value"))))
272 (minibuffer-auto-raise minibuffer boolean
)
273 ;; options property set at end
274 (read-buffer-function minibuffer
276 (function-item iswitchb-read-buffer
)
279 (dos-unsupported-char-glyph display integer
)
281 (delete-exited-processes processes-basics boolean
)
283 (parse-sexp-ignore-comments editing-basics boolean
)
284 (words-include-escapes editing-basics boolean
)
285 (open-paren-in-column-0-is-defun-start editing-basics boolean
288 (visible-cursor cursor boolean
"22.1")
290 (undo-limit undo integer
)
291 (undo-strong-limit undo integer
)
292 (undo-outer-limit undo
294 (const :tag
"No limit"
298 the undo info for the current command never gets discarded.
299 This should only be chosen under exceptional circumstances,
300 since it could result in memory overflow and make Emacs crash."
304 (temp-buffer-show-function windows
(choice (const nil
) function
))
305 (display-buffer-function windows
(choice (const nil
) function
))
306 (pop-up-frames frames boolean
)
307 (pop-up-frame-function frames function
)
308 (special-display-buffer-names
310 (repeat (choice :tag
"Buffer"
312 (string :format
"%v")
313 (cons :tag
"With attributes"
316 (string :format
"%v")
317 (repeat :tag
"Attributes"
319 (symbol :tag
"Parameter")
320 (sexp :tag
"Value")))))))
321 (special-display-regexps
323 (repeat (choice :tag
"Buffer"
325 (regexp :format
"%v")
326 (cons :tag
"With attributes"
329 (regexp :format
"%v")
330 (repeat :tag
"Attributes"
332 (symbol :tag
"Parameter")
333 (sexp :tag
"Value")))))))
334 (special-display-function frames function
)
335 (same-window-buffer-names windows
(repeat (string :format
"%v")))
336 (same-window-regexps windows
(repeat (regexp :format
"%v")))
337 (pop-up-windows windows boolean
)
338 (even-window-heights windows boolean
)
339 (next-screen-context-lines windows integer
)
340 (split-height-threshold windows integer
)
341 (split-window-preferred-function
343 (choice (const :tag
"vertically" nil
)
344 ;; FIXME: Add `sensibly' which chooses between
345 ;; vertical or horizontal splits depending on the size
346 ;; and shape of the window.
347 (const :tag
"horizontally"
348 split-window-preferred-horizontally
))
350 (window-min-height windows integer
)
351 (window-min-width windows integer
)
352 (scroll-preserve-screen-position
354 (const :tag
"Off (nil)" :value nil
)
355 (const :tag
"Full screen (t)" :value t
)
356 (other :tag
"Always" 1)) "22.1")
357 (display-buffer-reuse-frames windows boolean
"21.1")
359 (scroll-step windows integer
)
360 (scroll-conservatively windows integer
)
361 (scroll-margin windows integer
)
362 (hscroll-margin windows integer
"22.1")
363 (hscroll-step windows number
"22.1")
364 (truncate-partial-width-windows display boolean
)
365 (mode-line-inverse-video mode-line boolean
)
366 (mode-line-in-non-selected-windows mode-line boolean
"22.1")
367 (line-number-display-limit display
369 (const :tag
"No limit" nil
)))
370 (line-number-display-limit-width display integer
"22.1")
371 (highlight-nonselected-windows display boolean
)
372 (message-log-max debug
(choice (const :tag
"Disable" nil
)
373 (integer :menu-tag
"lines"
375 (other :tag
"Unlimited" t
)))
376 (unibyte-display-via-language-environment mule boolean
)
377 (blink-cursor-alist cursor alist
"22.1")
378 (overline-margin display integer
"22.1")
379 (mouse-autoselect-window
381 (const :tag
"Off (nil)" :value nil
)
382 (const :tag
"Immediate" :value t
)
383 (number :tag
"Delay by secs" :value
0.5)) "22.1")
385 (scalable-fonts-allowed display boolean
"22.1")
387 (x-bitmap-file-path installation
388 (repeat (directory :format
"%v")))
389 (x-gtk-use-old-file-dialog menu boolean
"22.1")
390 (x-gtk-show-hidden-files menu boolean
"22.1")
391 (x-gtk-file-dialog-help-text menu boolean
"22.1")
392 (x-gtk-whole-detached-tool-bar x boolean
"22.1")
394 (x-use-underline-position-properties display boolean
"22.1")
395 (x-underline-at-descent-line display boolean
"22.1")
396 (x-stretch-cursor display boolean
"21.1")))
397 this symbol group type standard version native-p
398 ;; This function turns a value
399 ;; into an expression which produces that value.
400 (quoter (lambda (sexp)
401 (if (or (memq sexp
'(t nil
))
404 (memq (car sexp
) '(lambda)))
408 (list 'quote sexp
)))))
416 ;; If we did not specify any standard value expression above,
417 ;; use the current value as the standard value.
418 standard
(if (nthcdr 4 this
)
420 (when (default-boundp symbol
)
421 (funcall quoter
(default-value symbol
))))
422 ;; Don't complain about missing variables which are
423 ;; irrelevant to this platform.
424 native-p
(save-match-data
426 ((string-match "\\`dos-" (symbol-name symbol
))
427 (eq system-type
'ms-dos
))
428 ((string-match "\\`w32-" (symbol-name symbol
))
429 (eq system-type
'windows-nt
))
430 ((string-match "\\`mac-" (symbol-name symbol
))
431 (featurep 'mac-carbon
))
432 ((string-match "\\`x-.*gtk" (symbol-name symbol
))
434 ((string-match "\\`x-" (symbol-name symbol
))
435 (fboundp 'x-create-frame
))
436 ((string-match "selection" (symbol-name symbol
))
437 (fboundp 'x-selection-exists-p
))
438 ((string-match "fringe" (symbol-name symbol
))
439 (fboundp 'define-fringe-bitmap
))
441 (if (not (boundp symbol
))
442 ;; If variables are removed from C code, give an error here!
444 (message "Note, built-in variable `%S' not bound" symbol
))
445 ;; Save the standard value, unless we already did.
446 (or (get symbol
'standard-value
)
447 (put symbol
'standard-value
(list standard
)))
448 ;; If this is NOT while dumping Emacs,
449 ;; set up the rest of the customization info.
451 ;; Add it to the right group.
452 (custom-add-to-group group symbol
'custom-variable
)
454 (put symbol
'custom-type type
)
455 (put symbol
'custom-version version
)))))
457 (custom-add-to-group 'iswitchb
'read-buffer-function
'custom-variable
)
458 (custom-add-to-group 'font-lock
'open-paren-in-column-0-is-defun-start
461 ;; Record cus-start as loaded
462 ;; if we have set up all the info that we can set up.
463 ;; Don't record cus-start as loaded
464 ;; if we have set up only the standard values.
466 (provide 'cus-start
))
468 ;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60
469 ;;; cus-start.el ends here