1 ;;; cus-start.el --- define customization properties of builtins.
3 ;; Copyright (C) 1997 Free Software Foundation, Inc.
5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
10 ;; Must be run before the user has changed the value of any options!
14 (defun custom-start-quote (sexp)
15 ;; This is copied from `cus-edit.el'.
16 "Quote SEXP iff it is not self quoting."
17 (if (or (memq sexp '(t nil))
19 (eq (aref (symbol-name sexp) 0) ?:))
21 (memq (car sexp) '(lambda)))
24 (and (fboundp 'characterp)
29 ;; Add support for build in variables.
30 (let ((all '(;; abbrev.c
31 (abbrev-all-caps abbrev-mode boolean)
32 (pre-abbrev-expand-hook abbrev-mode hook)
34 (gc-cons-threshold alloc integer)
35 (undo-limit undo integer)
36 (undo-strong-limit undo integer)
37 (garbage-collection-messages alloc boolean)
39 (mode-line-format modeline sexp) ;Hard to do right.
40 (default-major-mode internal function)
41 (case-fold-search matching boolean)
42 (fill-column fill integer)
43 (left-margin fill integer)
44 (tab-width editing-basics integer)
45 (ctl-arrow display boolean)
46 (truncate-lines display boolean)
47 (selective-display display
48 (choice (const :tag "off" nil)
53 (selective-display-ellipses display boolean)
54 (transient-mark-mode editing-basics boolean)
56 (mark-even-if-inactive editing-basics boolean)
58 (shell-file-name execute file)
60 (repeat (choice (const :tag "default" nil)
61 (file :format "%v"))))
63 (completion-ignored-extensions dired
64 (repeat (string :format "%v")))
66 (baud-rate display integer)
67 (inverse-video display boolean)
68 (visible-bell display boolean)
69 (no-redraw-on-reenter display boolean)
71 (user-full-name mail string)
73 (max-specpdl-size limits integer)
74 (max-lisp-eval-depth limits integer)
75 (stack-trace-on-error debug
76 (choice (const :tag "off")
77 (repeat :menu-tag "When"
79 (symbol :format "%v"))
80 (const :tag "always" t)))
82 (choice (const :tag "off")
83 (repeat :menu-tag "When"
85 (symbol :format "%v"))
86 (const :tag "always" t)))
87 (debug-ignored-errors debug (repeat (choice symbol regexp)))
88 (debug-on-quit debug choice)
90 (insert-default-directory minibuffer boolean)
92 (default-frame-alist frames
93 (repeat (cons :format "%v"
94 (symbol :tag "Parameter")
95 (sexp :tag "Value"))))
97 (indent-tabs-mode fill boolean)
99 (meta-prefix-char keyboard character)
100 (auto-save-interval auto-save integer)
101 (auto-save-timeout auto-save (choice (const :tag "off" nil)
102 (integer :format "%v")))
103 (echo-keystrokes minibuffer boolean)
104 (polling-period keyboard integer)
105 (double-click-time mouse integer)
106 (inhibit-local-menu-bar-menus menu boolean)
107 (help-char keyboard character)
108 (help-event-list keyboard (repeat (sexp :format "%v")))
109 (menu-prompting menu boolean)
110 (track-mouse mouse boolean)
111 (suggest-key-bindings keyboard (choice (const :tag "off" nil)
112 (integer :tag "time" 2)
116 (load-path environment
117 (repeat (choice :tag "Directory"
118 (const :tag "default" nil)
119 (directory :format "%v"))))
121 (completion-auto-help minibuffer boolean)
122 (enable-recursive-minibuffers minibuffer boolean)
123 (minibuffer-auto-raise minibuffer boolean)
125 (delete-exited-processes proces-basics boolean)
127 (parse-sexp-ignore-comments editing-basics boolean)
128 (words-include-escapes editing-basics boolean)
130 (temp-buffer-show-function windows function)
131 (display-buffer-function windows function)
132 (pop-up-frames frames boolean)
133 (pop-up-frame-function frames function)
134 (special-display-buffer-names
136 (repeat (choice :tag "Buffer"
138 (string :format "%v")
139 (cons :tag "With attributes"
142 (string :format "%v")
143 (repeat :tag "Attributes"
145 (symbol :tag "Parameter")
146 (sexp :tag "Value")))))))
147 (special-display-regexps
149 (repeat (choice :tag "Buffer"
151 (regexp :format "%v")
152 (cons :tag "With attributes"
155 (regexp :format "%v")
156 (repeat :tag "Attributes"
158 (symbol :tag "Parameter")
159 (sexp :tag "Value")))))))
160 (special-display-function frames function)
161 (same-window-buffer-names windows (repeat (string :format "%v")))
162 (same-window-regexps windows (repeat (regexp :format "%v")))
163 (pop-up-windows windows boolean)
164 (next-screen-context-lines windows boolean)
165 (split-height-threshold windows integer)
166 (window-min-height windows integer)
167 (window-min-width windows integer)
169 (scroll-step windows integer)
170 (truncate-partial-width-windows display boolean)
171 (mode-line-inverse-video modeline boolean)
172 (line-number-display-limit display integer)
173 (highlight-nonselected-windows display boolean)
174 (message-log-max debug (choice (const :tag "Disable" nil)
175 (integer :menu-tag "lines"
177 (const :tag "Unlimited" t)))
179 (x-bitmap-file-path installation
180 (repeat (directory :format "%v")))))
181 this symbol group type)
188 (if (not (boundp symbol))
189 ;; If variables are removed from C code, give an error here!
190 (message "Intrinsic `%S' not bound" symbol)
191 ;; This is called before any user can have changed the value.
192 (put symbol 'factory-value
193 (list (custom-start-quote (default-value symbol))))
194 ;; Add it to the right group.
195 (custom-add-to-group group symbol 'custom-variable)
197 (put symbol 'custom-type type))))
199 ;; Add support for build in faces.
200 (let ((all '((bold "Use bold font.")
201 (bold-italic "Use bold italic font.")
202 (italic "Use italic font.")
203 (underline "Underline text.")
204 (default "Used for text not covered by other faces.")
205 (highlight "Highlight text in some way.")
206 (modeline "Used for displaying the modeline.")
207 (region "Used for displaying the region.")
209 "Used for displaying the secondary selection.")))
212 (setq entry (car all)
216 (put symbol 'face-documentation doc)))
218 ;;; cus-start.el ends here.