aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Abrahamsen1997-04-12 17:51:31 +0000
committerPer Abrahamsen1997-04-12 17:51:31 +0000
commit1444b0c0f36d1de0f20549b397873dfae86a7164 (patch)
treedc21a5ff680f5bca07db10a8da3a099889ee5a94
parentbd042c030f6530726313e4ff55065df7e2ee41a9 (diff)
downloademacs-1444b0c0f36d1de0f20549b397873dfae86a7164.tar.gz
emacs-1444b0c0f36d1de0f20549b397873dfae86a7164.zip
Initial revision
-rw-r--r--lisp/cus-start.el198
1 files changed, 198 insertions, 0 deletions
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
new file mode 100644
index 00000000000..0865ecd8130
--- /dev/null
+++ b/lisp/cus-start.el
@@ -0,0 +1,198 @@
1;;; cus-start.el --- define customization properties of builtins.
2;;
3;; Copyright (C) 1997 Free Software Foundation, Inc.
4;;
5;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
6;; Keywords: internal
7
8;;; Commentary:
9;;
10;; Must be run before the user has changed the value of any options!
11
12;;; Code:
13
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))
18 (and (symbolp sexp)
19 (eq (aref (symbol-name sexp) 0) ?:))
20 (and (listp sexp)
21 (memq (car sexp) '(lambda)))
22 (stringp sexp)
23 (numberp sexp)
24 (and (fboundp 'characterp)
25 (characterp sexp)))
26 sexp
27 (list 'quote sexp)))
28
29(let ((all '(;; abbrev.c
30 (abbrev-all-caps abbrev-mode boolean)
31 (pre-abbrev-expand-hook abbrev-mode hook)
32 ;; alloc.c
33 (gc-cons-threshold alloc integer)
34 (undo-limit undo integer)
35 (undo-strong-limit undo integer)
36 (garbage-collection-messages alloc boolean)
37 ;; buffer.c
38 (mode-line-format modeline sexp) ;Hard to do right.
39 (default-major-mode internal function)
40 (case-fold-search matching boolean)
41 (fill-column fill integer)
42 (left-margin fill integer)
43 (tab-width editing-basics integer)
44 (ctl-arrow display boolean)
45 (truncate-lines display boolean)
46 (selective-display display
47 (choice (const :tag "off" nil)
48 (integer :tag "space"
49 :format "%v"
50 1)
51 (const :tag "on" t)))
52 (selective-display-ellipses display boolean)
53 (transient-mark-mode editing-basics boolean)
54 ;; callint.c
55 (mark-even-if-inactive editing-basics boolean)
56 ;; callproc.c
57 (shell-file-name execute file)
58 (exec-path execute
59 (repeat (choice (const :tag "default" nil)
60 (file :format "%v"))))
61 ;; dired.c
62 (completion-ignored-extensions dired
63 (repeat (string :format "%v")))
64 ;; dispnew.el
65 (baud-rate display integer)
66 (inverse-video display boolean)
67 (visible-bell display boolean)
68 (no-redraw-on-reenter display boolean)
69 ;; editfns.c
70 (user-full-name mail string)
71 ;; eval.c
72 (max-specpdl-size limits integer)
73 (max-lisp-eval-depth limits integer)
74 (stack-trace-on-error debug
75 (choice (const :tag "off")
76 (repeat :menu-tag "When"
77 :value (nil)
78 (symbol :format "%v"))
79 (const :tag "always" t)))
80 (debug-on-error debug
81 (choice (const :tag "off")
82 (repeat :menu-tag "When"
83 :value (nil)
84 (symbol :format "%v"))
85 (const :tag "always" t)))
86 (debug-ignored-errors debug (repeat (choice symbol regexp)))
87 (debug-on-quit debug choice)
88 ;; fileio.c
89 (insert-default-directory minibuffer boolean)
90 ;; frame.c
91 (default-frame-alist frames
92 (repeat (cons :format "%v"
93 (symbol :tag "Parameter")
94 (sexp :tag "Value"))))
95 ;; indent.c
96 (indent-tabs-mode fill boolean)
97 ;; keyboard.c
98 (meta-prefix-char keyboard character)
99 (auto-save-interval auto-save integer)
100 (auto-save-timeout auto-save (choice (const :tag "off" nil)
101 (integer :format "%v")))
102 (echo-keystrokes minibuffer boolean)
103 (polling-period keyboard integer)
104 (double-click-time mouse integer)
105 (inhibit-local-menu-bar-menus menu boolean)
106 (help-char keyboard character)
107 (help-event-list keyboard (repeat (sexp :format "%v")))
108 (menu-prompting menu boolean)
109 (track-mouse mouse boolean)
110 (suggest-key-bindings keyboard (choice (const :tag "off" nil)
111 (integer :tag "time" 2)
112 (sexp :tag "on"
113 :format "%t")))
114 ;; lread.c
115 (load-path environment
116 (repeat (choice :tag "Directory"
117 (const :tag "default" nil)
118 (directory :format "%v"))))
119 ;; minibuf.c
120 (completion-auto-help minibuffer boolean)
121 (enable-recursive-minibuffers minibuffer boolean)
122 (minibuffer-auto-raise minibuffer boolean)
123 ;; process.c
124 (delete-exited-processes proces-basics boolean)
125 ;; syntax.c
126 (parse-sexp-ignore-comments editing-basics boolean)
127 (words-include-escapes editing-basics boolean)
128 ;; window.c
129 (temp-buffer-show-function windows function)
130 (display-buffer-function windows function)
131 (pop-up-frames frames boolean)
132 (pop-up-frame-function frames function)
133 (special-display-buffer-names
134 frames
135 (repeat (choice :tag "Buffer"
136 :value ""
137 (string :format "%v")
138 (cons :tag "With attributes"
139 :format "%v"
140 :value ("" . nil)
141 (string :format "%v")
142 (repeat :tag "Attributes"
143 (cons :format "%v"
144 (symbol :tag "Parameter")
145 (sexp :tag "Value")))))))
146 (special-display-regexps
147 frames
148 (repeat (choice :tag "Buffer"
149 :value ""
150 (regexp :format "%v")
151 (cons :tag "With attributes"
152 :format "%v"
153 :value ("" . nil)
154 (regexp :format "%v")
155 (repeat :tag "Attributes"
156 (cons :format "%v"
157 (symbol :tag "Parameter")
158 (sexp :tag "Value")))))))
159 (special-display-function frames function)
160 (same-window-buffer-names windows (repeat (string :format "%v")))
161 (same-window-regexps windows (repeat (regexp :format "%v")))
162 (pop-up-windows windows boolean)
163 (next-screen-context-lines windows boolean)
164 (split-height-threshold windows integer)
165 (window-min-height windows integer)
166 (window-min-width windows integer)
167 ;; xdisp.c
168 (scroll-step windows integer)
169 (truncate-partial-width-windows display boolean)
170 (mode-line-inverse-video modeline boolean)
171 (line-number-display-limit display integer)
172 (highlight-nonselected-windows display boolean)
173 (message-log-max debug (choice (const :tag "Disable" nil)
174 (integer :menu-tag "lines"
175 :format "%v")
176 (const :tag "Unlimited" t)))
177 ;; xfns.c
178 (x-bitmap-file-path installation
179 (repeat (directory :format "%v")))))
180 this symbol group type)
181 (while all
182 (setq this (car all)
183 all (cdr all)
184 symbol (nth 0 this)
185 group (nth 1 this)
186 type (nth 2 this))
187 (if (not (boundp symbol))
188 ;; If variables are removed from C code, give an error here!
189 (message "Intrinsic `%S' not bound" symbol)
190 ;; This is called before any user can have changed the value.
191 (put symbol 'factory-value
192 (list (custom-start-quote (default-value symbol))))
193 ;; Add it to the right group.
194 (custom-add-to-group group symbol 'custom-variable)
195 ;; Set the type.
196 (put symbol 'custom-type type))))
197
198;;; cus-start.el ends here.