1 ;;; cus-start.el --- define customization properties of builtins
3 ;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004,
4 ;; 2005 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 2, or (at your option)
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; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 ;; Boston, MA 02110-1301, USA.
28 ;; This file adds customize support for built-in variables.
30 ;; While dumping Emacs, this file is loaded, but it only records
31 ;; the standard values; it does not do the rest of the job.
32 ;; Later on, if the user makes a customization buffer,
33 ;; this file is loaded again with (require 'cus-start);
34 ;; then it does the whole job.
38 (let ((all '(;; abbrev.c
39 (abbrev-all-caps abbrev-mode boolean
)
40 (pre-abbrev-expand-hook abbrev-mode hook
)
42 (gc-cons-threshold alloc integer
)
43 (garbage-collection-messages alloc boolean
)
45 (mode-line-format modeline sexp
) ;Hard to do right.
46 (default-major-mode internal function
)
47 (enable-multibyte-characters mule boolean
)
48 (case-fold-search matching boolean
)
49 (fill-column fill integer
)
50 (left-margin fill integer
)
51 (tab-width editing-basics integer
)
52 (ctl-arrow display boolean
)
53 (truncate-lines display boolean
)
54 (selective-display-ellipses display boolean
)
55 (indicate-empty-lines fringe boolean
"21.1")
56 (indicate-buffer-boundaries
59 (const :tag
"No indicators" nil
)
60 (const :tag
"On left, with arrows" left
)
61 (const :tag
"On right, with arrows" right
)
62 (set :tag
"Pick your own design"
64 :format
"%{%t%}:\n%v\n%d"
65 :doc
"You can specify a default and then override it \
66 for individual indicators.
67 Leaving \"Default\" unchecked is equivalent with specifying a default of
69 (choice :tag
"Default"
71 (const :tag
"Do not show" (t . nil
))
72 (const :tag
"On the left" (t . left
))
73 (const :tag
"On the right" (t . right
)))
76 (const :tag
"Do not show" (top . nil
))
77 (const :tag
"On the left" (top . left
))
78 (const :tag
"On the right" (top . right
)))
80 :value
(bottom . left
)
81 (const :tag
"Do not show" (bottom . nil
))
82 (const :tag
"On the left" (bottom . left
))
83 (const :tag
"On the right" (bottom . right
)))
84 (choice :tag
"Up arrow"
86 (const :tag
"Do not show" (up . nil
))
87 (const :tag
"On the left" (up . left
))
88 (const :tag
"On the right" (up . right
)))
89 (choice :tag
"Down arrow"
91 (const :tag
"Do not show" (down . nil
))
92 (const :tag
"On the left" (down . left
))
93 (const :tag
"On the right" (down . right
))))
94 (other :tag
"On left, no arrows" t
))
96 (scroll-up-aggressively windows
97 (choice (const :tag
"off" nil
) number
)
99 (scroll-down-aggressively windows
100 (choice (const :tag
"off" nil
) number
)
102 (line-spacing display
(choice (const :tag
"none" nil
) integer
))
104 (mark-even-if-inactive editing-basics boolean
)
106 (shell-file-name execute file
)
108 (repeat (choice (const :tag
"default directory" nil
)
109 (directory :format
"%v"))))
111 (inhibit-eol-conversion mule boolean
)
112 (eol-mnemonic-undecided mule string
)
113 (eol-mnemonic-unix mule string
)
114 (eol-mnemonic-dos mule string
)
115 (eol-mnemonic-mac mule string
)
116 (file-coding-system-alist
119 :key-type
(regexp :tag
"File regexp")
121 :value
(undecided . undecided
)
122 (cons :tag
"Encoding/decoding pair"
123 :value
(undecided . undecided
)
124 (coding-system :tag
"Decoding")
125 (coding-system :tag
"Encoding"))
126 (coding-system :tag
"Single coding system"
128 (function :value ignore
))))
129 (selection-coding-system mule coding-system
)
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 (stack-trace-on-error debug
144 (choice (const :tag
"off")
145 (repeat :menu-tag
"When"
147 (symbol :format
"%v"))
148 (const :tag
"always" t
)))
149 (debug-on-error debug
150 (choice (const :tag
"off")
151 (repeat :menu-tag
"When"
153 (symbol :format
"%v"))
154 (const :tag
"always" t
)))
155 (debug-ignored-errors debug
(repeat (choice symbol regexp
)))
157 (choice (const :tag
"off")
158 (repeat :menu-tag
"When"
160 (symbol :format
"%v"))
161 (const :tag
"always" t
)))
163 (insert-default-directory minibuffer boolean
)
164 (read-file-name-completion-ignore-case minibuffer boolean
"22.1")
166 (use-dialog-box menu boolean
"21.1")
167 (use-file-dialog menu boolean
"22.1")
169 (default-frame-alist frames
170 (repeat (cons :format
"%v"
171 (symbol :tag
"Parameter")
172 (sexp :tag
"Value"))))
173 (mouse-highlight mouse
(choice (const :tag
"disabled" nil
)
174 (const :tag
"always shown" t
)
175 (other :tag
"hidden by keypress" 1)))
177 (overflow-newline-into-fringe fringe boolean
"22.1")
179 (indent-tabs-mode fill boolean
)
181 (meta-prefix-char keyboard character
)
182 (auto-save-interval auto-save integer
)
183 (auto-save-timeout auto-save
(choice (const :tag
"off" nil
)
184 (integer :format
"%v")))
185 (echo-keystrokes minibuffer number
)
186 (polling-period keyboard integer
)
187 (double-click-time mouse
(restricted-sexp
188 :match-alternatives
(integerp 'nil
't
)))
189 (double-click-fuzz mouse integer
)
190 (inhibit-local-menu-bar-menus menu boolean
)
191 (help-char keyboard character
)
192 (help-event-list keyboard
(repeat (sexp :format
"%v")))
193 (menu-prompting menu boolean
)
194 (suggest-key-bindings keyboard
(choice (const :tag
"off" nil
)
195 (integer :tag
"time" 2)
198 ;; This is not good news because it will use the wrong
199 ;; version-specific directories when you upgrade. We need
200 ;; customization of the front of the list, maintaining the standard
201 ;; value intact at the back.
202 ;;; (load-path environment
203 ;;; (repeat (choice :tag "[Current dir?]"
204 ;;; :format "%[Current dir?%] %v"
205 ;;; (const :tag " current dir" nil)
206 ;;; (directory :format "%v"))))
208 (completion-auto-help minibuffer boolean
)
209 (enable-recursive-minibuffers minibuffer boolean
)
210 (history-length minibuffer
211 (choice (const :tag
"Infinite" t
)
213 (history-delete-duplicates minibuffer boolean
)
214 (minibuffer-prompt-properties
218 (const :tag
"Read-Only"
219 :doc
"Prevent prompt from being modified"
223 (const :tag
"Don't Enter"
224 :doc
"Prevent point from ever entering prompt"
227 (point-entered minibuffer-avoid-prompt
)))
229 :tag
"Other Properties"
232 (symbol :tag
"Property")
233 (sexp :tag
"Value"))))
235 (minibuffer-auto-raise minibuffer boolean
)
236 ;; options property set at end
237 (read-buffer-function minibuffer
239 (function-item iswitchb-read-buffer
)
242 (dos-unsupported-char-glyph display integer
)
244 (delete-exited-processes processes-basics boolean
)
246 (parse-sexp-ignore-comments editing-basics boolean
)
247 (words-include-escapes editing-basics boolean
)
248 (open-paren-in-column-0-is-defun-start editing-basics boolean
251 (undo-limit undo integer
)
252 (undo-strong-limit undo integer
)
253 (undo-outer-limit undo
255 (const :tag
"No limit"
259 the undo info for the current command never gets discarded.
260 This should only be chosen under exceptional circumstances,
261 since it could result in memory overflow and make Emacs crash."
265 (temp-buffer-show-function windows
(choice (const nil
) function
))
266 (display-buffer-function windows
(choice (const nil
) function
))
267 (pop-up-frames frames boolean
)
268 (pop-up-frame-function frames function
)
269 (special-display-buffer-names
271 (repeat (choice :tag
"Buffer"
273 (string :format
"%v")
274 (cons :tag
"With attributes"
277 (string :format
"%v")
278 (repeat :tag
"Attributes"
280 (symbol :tag
"Parameter")
281 (sexp :tag
"Value")))))))
282 (special-display-regexps
284 (repeat (choice :tag
"Buffer"
286 (regexp :format
"%v")
287 (cons :tag
"With attributes"
290 (regexp :format
"%v")
291 (repeat :tag
"Attributes"
293 (symbol :tag
"Parameter")
294 (sexp :tag
"Value")))))))
295 (special-display-function frames function
)
296 (same-window-buffer-names windows
(repeat (string :format
"%v")))
297 (same-window-regexps windows
(repeat (regexp :format
"%v")))
298 (pop-up-windows windows boolean
)
299 (even-window-heights windows boolean
)
300 (next-screen-context-lines windows integer
)
301 (split-height-threshold windows integer
)
302 (window-min-height windows integer
)
303 (window-min-width windows integer
)
304 (scroll-preserve-screen-position windows boolean
)
305 (display-buffer-reuse-frames windows boolean
"21.1")
307 (scroll-step windows integer
)
308 (scroll-conservatively windows integer
)
309 (scroll-margin windows integer
)
310 (hscroll-margin windows integer
"21.3")
311 (hscroll-step windows number
"21.3")
312 (truncate-partial-width-windows display boolean
)
313 (mode-line-inverse-video modeline boolean
)
314 (mode-line-in-non-selected-windows modeline boolean
"21.3")
315 (line-number-display-limit display
317 (const :tag
"No limit" nil
)))
318 (line-number-display-limit-width display integer
)
319 (highlight-nonselected-windows display boolean
)
320 (message-log-max debug
(choice (const :tag
"Disable" nil
)
321 (integer :menu-tag
"lines"
323 (other :tag
"Unlimited" t
)))
324 (unibyte-display-via-language-environment mule boolean
)
325 (blink-cursor-alist cursor alist
"22.1")
327 (scalable-fonts-allowed display boolean
)
329 (x-bitmap-file-path installation
330 (repeat (directory :format
"%v")))
331 (x-use-old-gtk-file-dialog menu boolean
"22.1")
333 (mouse-autoselect-window display boolean
"21.3")
334 (x-use-underline-position-properties display boolean
"21.3")
335 (x-stretch-cursor display boolean
"21.1")))
336 this symbol group type standard version native-p
337 ;; This function turns a value
338 ;; into an expression which produces that value.
339 (quoter (lambda (sexp)
340 (if (or (memq sexp
'(t nil
))
343 (memq (car sexp
) '(lambda)))
347 (list 'quote sexp
)))))
355 ;; If we did not specify any standard value expression above,
356 ;; use the current value as the standard value.
357 standard
(if (nthcdr 4 this
)
359 (when (default-boundp symbol
)
360 (funcall quoter
(default-value symbol
))))
361 ;; Don't complain about missing variables which are
362 ;; irrelevant to this platform.
363 native-p
(save-match-data
365 ((string-match "\\`dos-" (symbol-name symbol
))
366 (eq system-type
'ms-dos
))
367 ((string-match "\\`w32-" (symbol-name symbol
))
368 (eq system-type
'windows-nt
))
369 ((string-match "\\`x-.*gtk" (symbol-name symbol
))
372 (not (eq window-system
'pc
))
373 (not (eq system-type
'windows-nt
)))))
374 ((string-match "\\`x-" (symbol-name symbol
))
375 (fboundp 'x-create-frame
))
376 ((string-match "selection" (symbol-name symbol
))
377 (fboundp 'x-selection-exists-p
))
378 ((string-match "fringe" (symbol-name symbol
))
379 (fboundp 'define-fringe-bitmap
))
381 (if (not (boundp symbol
))
382 ;; If variables are removed from C code, give an error here!
384 (message "Note, built-in variable `%S' not bound" symbol
))
385 ;; Save the standard value, unless we already did.
386 (or (get symbol
'standard-value
)
387 (put symbol
'standard-value
(list standard
)))
388 ;; If this is NOT while dumping Emacs,
389 ;; set up the rest of the customization info.
391 ;; Add it to the right group.
392 (custom-add-to-group group symbol
'custom-variable
)
394 (put symbol
'custom-type type
)
395 (put symbol
'custom-version version
)))))
397 (custom-add-to-group 'iswitchb
'read-buffer-function
'custom-variable
)
398 (custom-add-to-group 'font-lock
'open-paren-in-column-0-is-defun-start
400 (put 'selection-coding-system
'custom-set
401 (lambda (symbol value
)
402 (set-selection-coding-system value
)
405 ;; Record cus-start as loaded
406 ;; if we have set up all the info that we can set up.
407 ;; Don't record cus-start as loaded
408 ;; if we have set up only the standard values.
410 (provide 'cus-start
))
412 ;;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60
413 ;;; cus-start.el ends here