1 ;;; cus-start.el --- define customization properties of builtins
3 ;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004,
4 ;; 2005, 2006, 2007, 2008, 2009, 2010 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 (major-mode internal function
)
42 (case-fold-search matching boolean
)
43 (fill-column fill integer
)
44 (left-margin fill integer
)
45 (tab-width editing-basics integer
)
46 (ctl-arrow display boolean
)
47 (truncate-lines display boolean
)
48 (word-wrap 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 (delete-by-moving-to-trash auto-save boolean
"23.1")
167 (auto-save-visited-file-name auto-save boolean
)
169 (use-dialog-box menu boolean
"21.1")
170 (use-file-dialog menu boolean
"22.1")
171 (focus-follows-mouse frames boolean
"20.3")
173 (default-frame-alist frames
174 (repeat (cons :format
"%v"
175 (symbol :tag
"Parameter")
176 (sexp :tag
"Value"))))
177 (mouse-highlight mouse
(choice (const :tag
"disabled" nil
)
178 (const :tag
"always shown" t
)
179 (other :tag
"hidden by keypress" 1))
181 (make-pointer-invisible mouse boolean
"23.2")
183 (overflow-newline-into-fringe fringe boolean
)
185 (indent-tabs-mode indent boolean
)
187 (meta-prefix-char keyboard character
)
188 (auto-save-interval auto-save integer
)
189 (auto-save-timeout auto-save
(choice (const :tag
"off" nil
)
190 (integer :format
"%v")))
191 (echo-keystrokes minibuffer number
)
192 (polling-period keyboard integer
)
193 (double-click-time mouse
(restricted-sexp
194 :match-alternatives
(integerp 'nil
't
)))
195 (double-click-fuzz mouse integer
"22.1")
196 (inhibit-local-menu-bar-menus menu boolean
)
197 (help-char keyboard character
)
198 (help-event-list keyboard
(repeat (sexp :format
"%v")))
199 (menu-prompting menu boolean
)
200 (suggest-key-bindings keyboard
(choice (const :tag
"off" nil
)
201 (integer :tag
"time" 2)
204 ;; This is not good news because it will use the wrong
205 ;; version-specific directories when you upgrade. We need
206 ;; customization of the front of the list, maintaining the standard
207 ;; value intact at the back.
208 ;;; (load-path environment
209 ;;; (repeat (choice :tag "[Current dir?]"
210 ;;; :format "%[Current dir?%] %v"
211 ;;; (const :tag " current dir" nil)
212 ;;; (directory :format "%v"))))
214 (enable-recursive-minibuffers minibuffer boolean
)
215 (history-length minibuffer
216 (choice (const :tag
"Infinite" t
) integer
)
218 (history-delete-duplicates minibuffer boolean
"22.1")
219 (read-buffer-completion-ignore-case minibuffer boolean
"23.1")
221 (minibuffer-prompt-properties
225 (const :tag
"Read-Only"
226 :doc
"Prevent prompt from being modified"
230 (const :tag
"Don't Enter"
231 :doc
"Prevent point from ever entering prompt"
234 (point-entered minibuffer-avoid-prompt
)))
236 :tag
"Other Properties"
239 (symbol :tag
"Property")
240 (sexp :tag
"Value"))))
242 (minibuffer-auto-raise minibuffer boolean
)
243 ;; options property set at end
244 (read-buffer-function minibuffer
246 (function-item iswitchb-read-buffer
)
249 (dos-unsupported-char-glyph display integer
)
253 (choice (const :tag
"No modifier" nil
)
254 (const control
) (const meta
)
255 (const alt
) (const hyper
)
256 (const super
)) "23.1")
259 (choice (const :tag
"No modifier" nil
)
260 (const control
) (const meta
)
261 (const alt
) (const hyper
)
262 (const super
)) "23.1")
263 (ns-alternate-modifier
265 (choice (const :tag
"No modifier (work as alternate/option)" none
)
266 (const control
) (const meta
)
267 (const alt
) (const hyper
)
268 (const super
)) "23.1")
269 (ns-function-modifier
271 (choice (const :tag
"No modifier (work as function)" none
)
272 (const control
) (const meta
)
273 (const alt
) (const hyper
)
274 (const super
)) "23.1")
275 (ns-antialias-text ns boolean
"23.1")
277 (delete-exited-processes processes-basics boolean
)
279 (parse-sexp-ignore-comments editing-basics boolean
)
280 (words-include-escapes editing-basics boolean
)
281 (open-paren-in-column-0-is-defun-start editing-basics boolean
284 (visible-cursor cursor boolean
"22.1")
286 (undo-limit undo integer
)
287 (undo-strong-limit undo integer
)
288 (undo-outer-limit undo
290 (const :tag
"No limit"
294 the undo info for the current command never gets discarded.
295 This should only be chosen under exceptional circumstances,
296 since it could result in memory overflow and make Emacs crash."
300 (temp-buffer-show-function windows
(choice (const nil
) function
))
301 (next-screen-context-lines windows integer
)
302 (window-min-height windows integer
)
303 (window-min-width windows integer
)
304 (scroll-preserve-screen-position
306 (const :tag
"Off (nil)" :value nil
)
307 (const :tag
"Full screen (t)" :value t
)
308 (other :tag
"Always" 1)) "22.1")
309 (recenter-redisplay windows
311 (const :tag
"Never (nil)" :value nil
)
312 (const :tag
"Only on ttys" :value tty
)
313 (other :tag
"Always" t
))
316 (scroll-step windows integer
)
317 (scroll-conservatively windows integer
)
318 (scroll-margin windows integer
)
319 (hscroll-margin windows integer
"22.1")
320 (hscroll-step windows number
"22.1")
321 (truncate-partial-width-windows display boolean
"23.1")
322 (mode-line-inverse-video mode-line boolean
)
323 (mode-line-in-non-selected-windows mode-line boolean
"22.1")
324 (line-number-display-limit display
326 (const :tag
"No limit" nil
)))
327 (line-number-display-limit-width display integer
"22.1")
328 (highlight-nonselected-windows display boolean
)
329 (message-log-max debug
(choice (const :tag
"Disable" nil
)
330 (integer :menu-tag
"lines"
332 (other :tag
"Unlimited" t
)))
333 (unibyte-display-via-language-environment mule boolean
)
334 (blink-cursor-alist cursor alist
"22.1")
335 (overline-margin display integer
"22.1")
336 (underline-minimum-offset display integer
"23.1")
337 (mouse-autoselect-window
339 (const :tag
"Off (nil)" :value nil
)
340 (const :tag
"Immediate" :value t
)
341 (number :tag
"Delay by secs" :value
0.5)) "22.1")
344 (const :tag
"Images" :value image
)
345 (const :tag
"Text" :value text
)
346 (const :tag
"Both" :value both
)
347 (const :tag
"Both-horiz" :value both-horiz
)
348 (const :tag
"System default" :value nil
)) "23.3")
349 (tool-bar-max-label-size frames integer
"23.3")
352 (scalable-fonts-allowed display boolean
"22.1")
354 (x-bitmap-file-path installation
355 (repeat (directory :format
"%v")))
356 (x-gtk-use-old-file-dialog menu boolean
"22.1")
357 (x-gtk-show-hidden-files menu boolean
"22.1")
358 (x-gtk-file-dialog-help-text menu boolean
"22.1")
359 (x-gtk-whole-detached-tool-bar x boolean
"22.1")
361 (x-use-underline-position-properties display boolean
"22.1")
362 (x-underline-at-descent-line display boolean
"22.1")
363 (x-stretch-cursor display boolean
"21.1")
365 (font-use-system-font font-selection boolean
"23.2")))
366 this symbol group type standard version native-p
367 ;; This function turns a value
368 ;; into an expression which produces that value.
369 (quoter (lambda (sexp)
370 (if (or (memq sexp
'(t nil
))
373 (memq (car sexp
) '(lambda)))
377 (list 'quote sexp
)))))
385 ;; If we did not specify any standard value expression above,
386 ;; use the current value as the standard value.
387 standard
(if (nthcdr 4 this
)
389 (when (default-boundp symbol
)
390 (funcall quoter
(default-value symbol
))))
391 ;; Don't complain about missing variables which are
392 ;; irrelevant to this platform.
393 native-p
(save-match-data
395 ((string-match "\\`dos-" (symbol-name symbol
))
396 (eq system-type
'ms-dos
))
397 ((string-match "\\`w32-" (symbol-name symbol
))
398 (eq system-type
'windows-nt
))
399 ((string-match "\\`ns-" (symbol-name symbol
))
401 ((string-match "\\`x-.*gtk" (symbol-name symbol
))
403 ((string-match "\\`x-" (symbol-name symbol
))
404 (fboundp 'x-create-frame
))
405 ((string-match "selection" (symbol-name symbol
))
406 (fboundp 'x-selection-exists-p
))
407 ((string-match "fringe" (symbol-name symbol
))
408 (fboundp 'define-fringe-bitmap
))
409 ((equal "font-use-system-font" (symbol-name symbol
))
410 (featurep 'system-font-setting
))
411 ;; Conditioned on x-create-frame, because that's
412 ;; the condition for loadup.el to preload tool-bar.el.
413 ((string-match "tool-bar-" (symbol-name symbol
))
414 (fboundp 'x-create-frame
))
416 (if (not (boundp symbol
))
417 ;; If variables are removed from C code, give an error here!
419 (message "Note, built-in variable `%S' not bound" symbol
))
420 ;; Save the standard value, unless we already did.
421 (or (get symbol
'standard-value
)
422 (put symbol
'standard-value
(list standard
)))
423 ;; If this is NOT while dumping Emacs,
424 ;; set up the rest of the customization info.
426 ;; Add it to the right group.
427 (custom-add-to-group group symbol
'custom-variable
)
429 (put symbol
'custom-type type
)
430 (put symbol
'custom-version version
)))))
432 (custom-add-to-group 'iswitchb
'read-buffer-function
'custom-variable
)
433 (custom-add-to-group 'font-lock
'open-paren-in-column-0-is-defun-start
436 ;; Record cus-start as loaded
437 ;; if we have set up all the info that we can set up.
438 ;; Don't record cus-start as loaded
439 ;; if we have set up only the standard values.
441 (provide 'cus-start
))
443 ;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60
444 ;;; cus-start.el ends here