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>
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
27 ;; This file adds customize support for built-in variables.
29 ;; While dumping Emacs, this file is loaded, but it only records
30 ;; the standard values; it does not do the rest of the job.
31 ;; Later on, if the user makes a customization buffer,
32 ;; this file is loaded again with (require 'cus-start);
33 ;; then it does the whole job.
37 (let ((all '(;; alloc.c
38 (gc-cons-threshold alloc integer
)
39 (garbage-collection-messages alloc boolean
)
41 (mode-line-format mode-line sexp
) ;Hard to do right.
42 (major-mode internal function
)
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 (word-wrap display boolean
)
50 (selective-display-ellipses display boolean
)
51 (indicate-empty-lines fringe boolean
)
52 (indicate-buffer-boundaries
55 (const :tag
"No indicators" nil
)
56 (const :tag
"On left, with arrows" left
)
57 (const :tag
"On right, with arrows" right
)
58 (set :tag
"Pick your own design"
60 :format
"%{%t%}:\n%v\n%d"
61 :doc
"You can specify a default and then override it \
62 for individual indicators.
63 Leaving \"Default\" unchecked is equivalent with specifying a default of
65 (choice :tag
"Default"
67 (const :tag
"Do not show" (t . nil
))
68 (const :tag
"On the left" (t . left
))
69 (const :tag
"On the right" (t . right
)))
72 (const :tag
"Do not show" (top . nil
))
73 (const :tag
"On the left" (top . left
))
74 (const :tag
"On the right" (top . right
)))
76 :value
(bottom . left
)
77 (const :tag
"Do not show" (bottom . nil
))
78 (const :tag
"On the left" (bottom . left
))
79 (const :tag
"On the right" (bottom . right
)))
80 (choice :tag
"Up arrow"
82 (const :tag
"Do not show" (up . nil
))
83 (const :tag
"On the left" (up . left
))
84 (const :tag
"On the right" (up . right
)))
85 (choice :tag
"Down arrow"
87 (const :tag
"Do not show" (down . nil
))
88 (const :tag
"On the left" (down . left
))
89 (const :tag
"On the right" (down . right
))))
90 (other :tag
"On left, no arrows" t
)))
91 (scroll-up-aggressively windows
92 (choice (const :tag
"off" nil
) number
)
94 (scroll-down-aggressively windows
95 (choice (const :tag
"off" nil
) number
)
97 (line-spacing display
(choice (const :tag
"none" nil
) integer
)
100 (mark-even-if-inactive editing-basics boolean
)
102 (shell-file-name execute file
)
104 (repeat (choice (const :tag
"default directory" nil
)
105 (directory :format
"%v"))))
107 (charset-map-path installation
108 (repeat (directory :format
"%v")))
110 (inhibit-eol-conversion mule boolean
)
111 (eol-mnemonic-undecided mule string
)
112 (eol-mnemonic-unix mule string
)
113 (eol-mnemonic-dos mule string
)
114 (eol-mnemonic-mac mule string
)
115 (file-coding-system-alist
118 :key-type
(regexp :tag
"File regexp")
120 :value
(undecided . undecided
)
121 (cons :tag
"Encoding/decoding pair"
122 :value
(undecided . undecided
)
123 (coding-system :tag
"Decoding")
124 (coding-system :tag
"Encoding"))
126 :tag
"Single coding system"
128 :match
(lambda (widget value
)
129 (and value
(not (functionp value
)))))
130 (function :value ignore
))))
132 (completion-ignored-extensions dired
133 (repeat (string :format
"%v")))
135 (baud-rate display integer
)
136 (inverse-video display boolean
)
137 (visible-bell display boolean
)
138 (no-redraw-on-reenter display boolean
)
140 (user-full-name mail string
)
142 (max-specpdl-size limits integer
)
143 (max-lisp-eval-depth limits integer
)
144 (max-mini-window-height limits
145 (choice (const :tag
"quarter screen" nil
)
147 (stack-trace-on-error debug
148 (choice (const :tag
"off")
149 (repeat :menu-tag
"When"
151 (symbol :format
"%v"))
152 (const :tag
"always" t
)))
153 (debug-on-error debug
154 (choice (const :tag
"off")
155 (repeat :menu-tag
"When"
157 (symbol :format
"%v"))
158 (const :tag
"always" t
)))
159 (debug-ignored-errors debug
(repeat (choice symbol regexp
)))
161 (choice (const :tag
"off")
162 (repeat :menu-tag
"When"
164 (symbol :format
"%v"))
165 (const :tag
"always" t
)))
167 (delete-by-moving-to-trash auto-save boolean
"23.1")
168 (auto-save-visited-file-name auto-save boolean
)
170 (use-dialog-box menu boolean
"21.1")
171 (use-file-dialog menu boolean
"22.1")
172 (focus-follows-mouse frames boolean
"20.3")
174 (default-frame-alist frames
175 (repeat (cons :format
"%v"
176 (symbol :tag
"Parameter")
177 (sexp :tag
"Value"))))
178 (mouse-highlight mouse
(choice (const :tag
"disabled" nil
)
179 (const :tag
"always shown" t
)
180 (other :tag
"hidden by keypress" 1))
182 (make-pointer-invisible mouse boolean
"23.2")
184 (overflow-newline-into-fringe fringe boolean
)
186 (indent-tabs-mode indent boolean
)
188 (meta-prefix-char keyboard character
)
189 (auto-save-interval auto-save integer
)
190 (auto-save-timeout auto-save
(choice (const :tag
"off" nil
)
191 (integer :format
"%v")))
192 (echo-keystrokes minibuffer number
)
193 (polling-period keyboard integer
)
194 (double-click-time mouse
(restricted-sexp
195 :match-alternatives
(integerp 'nil
't
)))
196 (double-click-fuzz mouse integer
"22.1")
197 (inhibit-local-menu-bar-menus menu boolean
)
198 (help-char keyboard character
)
199 (help-event-list keyboard
(repeat (sexp :format
"%v")))
200 (menu-prompting menu boolean
)
201 (select-active-regions killing
202 (choice (const :tag
"always" t
)
203 (const :tag
"only shift-selection or mouse-drag" only
)
204 (const :tag
"off" nil
))
206 (suggest-key-bindings keyboard
(choice (const :tag
"off" nil
)
207 (integer :tag
"time" 2)
210 ;; This is not good news because it will use the wrong
211 ;; version-specific directories when you upgrade. We need
212 ;; customization of the front of the list, maintaining the standard
213 ;; value intact at the back.
214 ;;; (load-path environment
215 ;;; (repeat (choice :tag "[Current dir?]"
216 ;;; :format "%[Current dir?%] %v"
217 ;;; (const :tag " current dir" nil)
218 ;;; (directory :format "%v"))))
220 (enable-recursive-minibuffers minibuffer boolean
)
221 (history-length minibuffer
222 (choice (const :tag
"Infinite" t
) integer
)
224 (history-delete-duplicates minibuffer boolean
"22.1")
225 (read-buffer-completion-ignore-case minibuffer boolean
"23.1")
227 (minibuffer-prompt-properties
231 (const :tag
"Read-Only"
232 :doc
"Prevent prompt from being modified"
236 (const :tag
"Don't Enter"
237 :doc
"Prevent point from ever entering prompt"
240 (point-entered minibuffer-avoid-prompt
)))
242 :tag
"Other Properties"
245 (symbol :tag
"Property")
246 (sexp :tag
"Value"))))
248 (minibuffer-auto-raise minibuffer boolean
)
249 ;; options property set at end
250 (read-buffer-function minibuffer
252 (function-item iswitchb-read-buffer
)
255 (dos-unsupported-char-glyph display integer
)
259 (choice (const :tag
"No modifier" nil
)
260 (const control
) (const meta
)
261 (const alt
) (const hyper
)
262 (const super
)) "23.1")
265 (choice (const :tag
"No modifier" nil
)
266 (const control
) (const meta
)
267 (const alt
) (const hyper
)
268 (const super
)) "23.1")
269 (ns-alternate-modifier
271 (choice (const :tag
"No modifier (work as alternate/option)" none
)
272 (const control
) (const meta
)
273 (const alt
) (const hyper
)
274 (const super
)) "23.1")
275 (ns-function-modifier
277 (choice (const :tag
"No modifier (work as function)" none
)
278 (const control
) (const meta
)
279 (const alt
) (const hyper
)
280 (const super
)) "23.1")
281 (ns-antialias-text ns boolean
"23.1")
283 (delete-exited-processes processes-basics boolean
)
285 (parse-sexp-ignore-comments editing-basics boolean
)
286 (words-include-escapes editing-basics boolean
)
287 (open-paren-in-column-0-is-defun-start editing-basics boolean
290 (visible-cursor cursor boolean
"22.1")
292 (undo-limit undo integer
)
293 (undo-strong-limit undo integer
)
294 (undo-outer-limit undo
296 (const :tag
"No limit"
300 the undo info for the current command never gets discarded.
301 This should only be chosen under exceptional circumstances,
302 since it could result in memory overflow and make Emacs crash."
306 (temp-buffer-show-function windows
(choice (const nil
) function
))
307 (next-screen-context-lines windows integer
)
308 (window-min-height windows integer
)
309 (window-min-width windows integer
)
310 (scroll-preserve-screen-position
312 (const :tag
"Off (nil)" :value nil
)
313 (const :tag
"Full screen (t)" :value t
)
314 (other :tag
"Always" 1)) "22.1")
315 (recenter-redisplay windows
317 (const :tag
"Never (nil)" :value nil
)
318 (const :tag
"Only on ttys" :value tty
)
319 (other :tag
"Always" t
))
322 (scroll-step windows integer
)
323 (scroll-conservatively windows integer
)
324 (scroll-margin windows integer
)
325 (hscroll-margin windows integer
"22.1")
326 (hscroll-step windows number
"22.1")
327 (truncate-partial-width-windows display boolean
"23.1")
328 (mode-line-inverse-video mode-line boolean
)
329 (mode-line-in-non-selected-windows mode-line boolean
"22.1")
330 (line-number-display-limit display
332 (const :tag
"No limit" nil
)))
333 (line-number-display-limit-width display integer
"22.1")
334 (highlight-nonselected-windows display boolean
)
335 (message-log-max debug
(choice (const :tag
"Disable" nil
)
336 (integer :menu-tag
"lines"
338 (other :tag
"Unlimited" t
)))
339 (unibyte-display-via-language-environment mule boolean
)
340 (blink-cursor-alist cursor alist
"22.1")
341 (overline-margin display integer
"22.1")
342 (underline-minimum-offset display integer
"23.1")
343 (mouse-autoselect-window
345 (const :tag
"Off (nil)" :value nil
)
346 (const :tag
"Immediate" :value t
)
347 (number :tag
"Delay by secs" :value
0.5)) "22.1")
350 (const :tag
"Images" :value image
)
351 (const :tag
"Text" :value text
)
352 (const :tag
"Both" :value both
)
353 (const :tag
"Both-horiz" :value both-horiz
)
354 (const :tag
"Text-image-horiz" :value text-image-horiz
)
355 (const :tag
"System default" :value nil
)) "23.3")
356 (tool-bar-max-label-size frames integer
"23.3")
359 (scalable-fonts-allowed display boolean
"22.1")
361 (x-bitmap-file-path installation
362 (repeat (directory :format
"%v")))
363 (x-gtk-use-old-file-dialog menu boolean
"22.1")
364 (x-gtk-show-hidden-files menu boolean
"22.1")
365 (x-gtk-file-dialog-help-text menu boolean
"22.1")
366 (x-gtk-whole-detached-tool-bar x boolean
"22.1")
367 (x-gtk-use-system-tooltips tooltip boolean
"23.3")
369 (x-use-underline-position-properties display boolean
"22.1")
370 (x-underline-at-descent-line display boolean
"22.1")
371 (x-stretch-cursor display boolean
"21.1")
373 (font-use-system-font font-selection boolean
"23.2")))
374 this symbol group type standard version native-p
375 ;; This function turns a value
376 ;; into an expression which produces that value.
377 (quoter (lambda (sexp)
378 (if (or (memq sexp
'(t nil
))
381 (memq (car sexp
) '(lambda)))
385 (list 'quote sexp
)))))
393 ;; If we did not specify any standard value expression above,
394 ;; use the current value as the standard value.
395 standard
(if (nthcdr 4 this
)
397 (when (default-boundp symbol
)
398 (funcall quoter
(default-value symbol
))))
399 ;; Don't complain about missing variables which are
400 ;; irrelevant to this platform.
401 native-p
(save-match-data
403 ((string-match "\\`dos-" (symbol-name symbol
))
404 (eq system-type
'ms-dos
))
405 ((string-match "\\`w32-" (symbol-name symbol
))
406 (eq system-type
'windows-nt
))
407 ((string-match "\\`ns-" (symbol-name symbol
))
409 ((string-match "\\`x-.*gtk" (symbol-name symbol
))
411 ((string-match "\\`x-" (symbol-name symbol
))
412 (fboundp 'x-create-frame
))
413 ((string-match "selection" (symbol-name symbol
))
414 (fboundp 'x-selection-exists-p
))
415 ((string-match "fringe" (symbol-name symbol
))
416 (fboundp 'define-fringe-bitmap
))
417 ((equal "font-use-system-font" (symbol-name symbol
))
418 (featurep 'system-font-setting
))
419 ;; Conditioned on x-create-frame, because that's
420 ;; the condition for loadup.el to preload tool-bar.el.
421 ((string-match "tool-bar-" (symbol-name symbol
))
422 (fboundp 'x-create-frame
))
424 (if (not (boundp symbol
))
425 ;; If variables are removed from C code, give an error here!
427 (message "Note, built-in variable `%S' not bound" symbol
))
428 ;; Save the standard value, unless we already did.
429 (or (get symbol
'standard-value
)
430 (put symbol
'standard-value
(list standard
)))
431 ;; If this is NOT while dumping Emacs,
432 ;; set up the rest of the customization info.
434 ;; Add it to the right group.
435 (custom-add-to-group group symbol
'custom-variable
)
437 (put symbol
'custom-type type
)
438 (put symbol
'custom-version version
)))))
440 (custom-add-to-group 'iswitchb
'read-buffer-function
'custom-variable
)
441 (custom-add-to-group 'font-lock
'open-paren-in-column-0-is-defun-start
444 ;; Record cus-start as loaded
445 ;; if we have set up all the info that we can set up.
446 ;; Don't record cus-start as loaded
447 ;; if we have set up only the standard values.
449 (provide 'cus-start
))
451 ;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60
452 ;;; cus-start.el ends here