Doc fixes. Remove redundant
[emacs.git] / lisp / cus-start.el
blobd650602487f6a81062717c18492471e2bc57970d
1 ;;; cus-start.el --- define customization properties of builtins
2 ;;
3 ;; Copyright (C) 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4 ;;
5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
6 ;; Keywords: internal
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version.
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
25 ;;; Commentary:
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.
35 ;;; Code:
37 (let ((all '(;; abbrev.c
38 (abbrev-all-caps abbrev-mode boolean)
39 (pre-abbrev-expand-hook abbrev-mode hook)
40 ;; alloc.c
41 (gc-cons-threshold alloc integer)
42 (undo-limit undo integer)
43 (undo-strong-limit undo integer)
44 (garbage-collection-messages alloc boolean)
45 ;; buffer.c
46 (mode-line-format modeline sexp) ;Hard to do right.
47 (default-major-mode internal function)
48 (enable-multibyte-characters mule boolean)
49 (case-fold-search matching boolean)
50 (fill-column fill integer)
51 (left-margin fill integer)
52 (tab-width editing-basics integer)
53 (ctl-arrow display boolean)
54 (truncate-lines display boolean)
55 (selective-display-ellipses display boolean)
56 (transient-mark-mode editing-basics boolean)
57 (indicate-empty-lines display boolean "21.1")
58 (scroll-up-aggressively windows boolean "21.1")
59 (scroll-down-aggressively windows boolean "21.1")
60 ;; callint.c
61 (mark-even-if-inactive editing-basics boolean)
62 ;; callproc.c
63 (shell-file-name execute file)
64 (exec-path execute
65 (repeat (choice (const :tag "default" nil)
66 (file :format "%v"))))
67 ;; charset.c
68 (charset-map-directory installation directory)
69 ;; coding.c
70 (inhibit-eol-conversion mule boolean)
71 (eol-mnemonic-undecided mule string)
72 (eol-mnemonic-unix mule string)
73 (eol-mnemonic-dos mule string)
74 (eol-mnemonic-mac mule string)
75 (file-coding-system-alist
76 mule
77 (alist
78 :key-type (regexp :tag "File regexp")
79 :value-type (choice
80 :value (undecided . undecided)
81 (cons :tag "Encoding/decoding pair"
82 :value (undecided . undecided)
83 (coding-system :tag "Decoding")
84 (coding-system :tag "Encoding"))
85 (coding-system :tag "Single coding system"
86 :value undecided)
87 (function :value ignore))))
88 ;; dired.c
89 (completion-ignored-extensions dired
90 (repeat (string :format "%v")))
91 ;; dispnew.c
92 (baud-rate display integer)
93 (inverse-video display boolean)
94 (visible-bell display boolean)
95 (no-redraw-on-reenter display boolean)
96 ;; editfns.c
97 (user-full-name mail string)
98 ;; eval.c
99 (max-specpdl-size limits integer)
100 (max-lisp-eval-depth limits integer)
101 (stack-trace-on-error debug
102 (choice (const :tag "off")
103 (repeat :menu-tag "When"
104 :value (nil)
105 (symbol :format "%v"))
106 (const :tag "always" t)))
107 (debug-on-error debug
108 (choice (const :tag "off")
109 (repeat :menu-tag "When"
110 :value (nil)
111 (symbol :format "%v"))
112 (const :tag "always" t)))
113 (debug-ignored-errors debug (repeat (choice symbol regexp)))
114 (debug-on-quit debug
115 (choice (const :tag "off")
116 (repeat :menu-tag "When"
117 :value (nil)
118 (symbol :format "%v"))
119 (const :tag "always" t)))
120 ;; fileio.c
121 (insert-default-directory minibuffer boolean)
122 ;; fns.c
123 (use-dialog-box menu boolean "21.1")
124 ;; frame.c
125 (default-frame-alist frames
126 (repeat (cons :format "%v"
127 (symbol :tag "Parameter")
128 (sexp :tag "Value"))))
129 (mouse-highlight mouse (choice (const :tag "disabled" nil)
130 (const :tag "always shown" t)
131 (other :tag "hidden by keypress" 1)))
132 ;; indent.c
133 (indent-tabs-mode fill boolean)
134 ;; keyboard.c
135 (meta-prefix-char keyboard character)
136 (auto-save-interval auto-save integer)
137 (auto-save-timeout auto-save (choice (const :tag "off" nil)
138 (integer :format "%v")))
139 (echo-keystrokes minibuffer number)
140 (polling-period keyboard integer)
141 (double-click-time mouse (restricted-sexp
142 :match-alternatives (integerp 'nil 't)))
143 (inhibit-local-menu-bar-menus menu boolean)
144 (help-char keyboard character)
145 (help-event-list keyboard (repeat (sexp :format "%v")))
146 (menu-prompting menu boolean)
147 (suggest-key-bindings keyboard (choice (const :tag "off" nil)
148 (integer :tag "time" 2)
149 (other :tag "on")))
151 ;; This is not good news because it will use the wrong
152 ;; version-specific directories when you upgrade. We need
153 ;; customization of the front of the list, maintaining the standard
154 ;; value intact at the back.
155 ;;; (load-path environment
156 ;;; (repeat (choice :tag "[Current dir?]"
157 ;;; :format "%[Current dir?%] %v"
158 ;;; (const :tag " current dir" nil)
159 ;;; (directory :format "%v"))))
160 ;; minibuf.c
161 (completion-auto-help minibuffer boolean)
162 (enable-recursive-minibuffers minibuffer boolean)
163 (history-length minibuffer
164 (choice (const :tag "Infinite" t)
165 integer))
166 (minibuffer-prompt-properties
167 minibuffer
168 (list
169 (checklist :inline t
170 (const :tag "Read-Only"
171 :doc "Prevent prompt from being modified"
172 :format "%t%n%h"
173 :inline t
174 (read-only t))
175 (const :tag "Inviolable"
176 :doc "Prevent point from ever entering prompt"
177 :format "%t%n%h"
178 :inline t
179 (point-entered minibuffer-avoid-prompt)))
180 (repeat :inline t
181 :tag "Other Properties"
182 (list :inline t
183 :format "%v"
184 (symbol :tag "Property")
185 (sexp :tag "Value"))))
186 "21.1")
187 (minibuffer-auto-raise minibuffer boolean)
188 ;; options property set at end
189 (read-buffer-function minibuffer
190 (choice (const nil)
191 (function-item iswitchb-read-buffer)
192 function))
193 ;; msdos.c
194 (dos-unsupported-char-glyph display integer)
195 ;; process.c
196 (delete-exited-processes processes-basics boolean)
197 ;; syntax.c
198 (parse-sexp-ignore-comments editing-basics boolean)
199 (words-include-escapes editing-basics boolean)
200 ;; window.c
201 (temp-buffer-show-function windows (choice (const nil) function))
202 (display-buffer-function windows (choice (const nil) function))
203 (pop-up-frames frames boolean)
204 (pop-up-frame-function frames function)
205 (special-display-buffer-names
206 frames
207 (repeat (choice :tag "Buffer"
208 :value ""
209 (string :format "%v")
210 (cons :tag "With attributes"
211 :format "%v"
212 :value ("" . nil)
213 (string :format "%v")
214 (repeat :tag "Attributes"
215 (cons :format "%v"
216 (symbol :tag "Parameter")
217 (sexp :tag "Value")))))))
218 (special-display-regexps
219 frames
220 (repeat (choice :tag "Buffer"
221 :value ""
222 (regexp :format "%v")
223 (cons :tag "With attributes"
224 :format "%v"
225 :value ("" . nil)
226 (regexp :format "%v")
227 (repeat :tag "Attributes"
228 (cons :format "%v"
229 (symbol :tag "Parameter")
230 (sexp :tag "Value")))))))
231 (special-display-function frames function)
232 (same-window-buffer-names windows (repeat (string :format "%v")))
233 (same-window-regexps windows (repeat (regexp :format "%v")))
234 (pop-up-windows windows boolean)
235 (even-window-heights windows boolean)
236 (next-screen-context-lines windows integer)
237 (split-height-threshold windows integer)
238 (window-min-height windows integer)
239 (window-min-width windows integer)
240 (scroll-preserve-screen-position windows boolean)
241 (display-buffer-reuse-frames windows boolean "21.1")
242 ;; xdisp.c
243 (scroll-step windows integer)
244 (scroll-conservatively windows integer)
245 (scroll-margin windows integer)
246 (automatic-hscroll-margin windows integer "21.3")
247 (automatic-hscroll-step windows number "21.3")
248 (truncate-partial-width-windows display boolean)
249 (mode-line-inverse-video modeline boolean)
250 (mode-line-in-non-selected-windows modeline boolean "21.3")
251 (line-number-display-limit display
252 (choice integer
253 (const :tag "No limit" nil)))
254 (highlight-nonselected-windows display boolean)
255 (message-log-max debug (choice (const :tag "Disable" nil)
256 (integer :menu-tag "lines"
257 :format "%v")
258 (other :tag "Unlimited" t)))
259 (unibyte-display-via-language-environment mule boolean)
260 ;; xfns.c
261 (x-bitmap-file-path installation
262 (repeat (directory :format "%v")))
263 ;; xterm.c
264 (x-autoselect-window display boolean "21.3")
265 (x-use-underline-position-properties display boolean "21.3")
266 (x-stretch-cursor display boolean "21.1")))
267 this symbol group type native-p version
268 ;; This function turns a value
269 ;; into an expression which produces that value.
270 (quoter (lambda (sexp)
271 (if (or (memq sexp '(t nil))
272 (keywordp sexp)
273 (and (listp sexp)
274 (memq (car sexp) '(lambda)))
275 (stringp sexp)
276 ;; (and (fboundp 'characterp)
277 ;; (characterp sexp))
278 (numberp sexp))
279 sexp
280 (list 'quote sexp)))))
281 (while all
282 (setq this (car all)
283 all (cdr all)
284 symbol (nth 0 this)
285 group (nth 1 this)
286 type (nth 2 this)
287 version (nth 3 this)
288 ;; Don't complain about missing variables which are
289 ;; irrelevant to this platform.
290 native-p (save-match-data
291 (cond
292 ((string-match "\\`dos-" (symbol-name symbol))
293 (eq system-type 'ms-dos))
294 ((string-match "\\`w32-" (symbol-name symbol))
295 (eq system-type 'windows-nt))
296 ((string-match "\\`x-" (symbol-name symbol))
297 (fboundp 'x-create-frame))
298 (t t))))
299 (if (not (boundp symbol))
300 ;; If variables are removed from C code, give an error here!
301 (and native-p
302 (message "Note, built-in variable `%S' not bound" symbol))
303 ;; Save the standard value, unless we already did.
304 (or (get symbol 'standard-value)
305 (put symbol 'standard-value
306 (list (funcall quoter (default-value symbol)))))
307 ;; If this is NOT while dumping Emacs,
308 ;; set up the rest of the customization info.
309 (unless purify-flag
310 ;; Add it to the right group.
311 (custom-add-to-group group symbol 'custom-variable)
312 ;; Set the type.
313 (put symbol 'custom-type type)
314 (put symbol 'custom-version version)))))
316 (custom-add-to-group 'iswitchb 'read-buffer-function 'custom-variable)
318 ;; Record cus-start as loaded
319 ;; if we have set up all the info that we can set up.
320 ;; Don't record cus-start as loaded
321 ;; if we have set up only the standard values.
322 (unless purify-flag
323 (provide 'cus-start))
325 ;;; cus-start.el ends here