Mercurial > emacs
annotate lisp/cus-start.el @ 18398:3c18aa006200
(LD_SWITCH_SYSTEM) [__mips__]: Alternate definition.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 23 Jun 1997 01:54:03 +0000 |
parents | 64a265eaa6d7 |
children | fa88b9cfa8bf |
rev | line source |
---|---|
17416 | 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 | |
17520 | 8 ;; This file is part of GNU Emacs. |
9 | |
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. | |
14 | |
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. | |
19 | |
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. | |
24 | |
17416 | 25 ;;; Commentary: |
26 ;; | |
18052
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
27 ;; This file adds customize support for built-in variables. |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
28 |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
29 ;; While dumping Emacs, this file is loaded, but it only records |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
30 ;; the standard values; it does not do the rest of the job. |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
31 ;; Later on, if the user makes a customization buffer, |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
32 ;; this file is loaded again with (require 'cus-start); |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
33 ;; then it does the whole job. |
17416 | 34 |
35 ;;; Code: | |
36 | |
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 (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 display | |
55 (choice (const :tag "off" nil) | |
56 (integer :tag "space" | |
57 :format "%v" | |
58 1) | |
59 (const :tag "on" t))) | |
60 (selective-display-ellipses display boolean) | |
61 (transient-mark-mode editing-basics boolean) | |
62 ;; callint.c | |
63 (mark-even-if-inactive editing-basics boolean) | |
64 ;; callproc.c | |
65 (shell-file-name execute file) | |
66 (exec-path execute | |
67 (repeat (choice (const :tag "default" nil) | |
68 (file :format "%v")))) | |
69 ;; dired.c | |
70 (completion-ignored-extensions dired | |
71 (repeat (string :format "%v"))) | |
72 ;; dispnew.el | |
73 (baud-rate display integer) | |
74 (inverse-video display boolean) | |
75 (visible-bell display boolean) | |
76 (no-redraw-on-reenter display boolean) | |
77 ;; editfns.c | |
78 (user-full-name mail string) | |
79 ;; eval.c | |
80 (max-specpdl-size limits integer) | |
81 (max-lisp-eval-depth limits integer) | |
82 (stack-trace-on-error debug | |
83 (choice (const :tag "off") | |
84 (repeat :menu-tag "When" | |
85 :value (nil) | |
86 (symbol :format "%v")) | |
87 (const :tag "always" t))) | |
88 (debug-on-error debug | |
89 (choice (const :tag "off") | |
90 (repeat :menu-tag "When" | |
91 :value (nil) | |
92 (symbol :format "%v")) | |
93 (const :tag "always" t))) | |
94 (debug-ignored-errors debug (repeat (choice symbol regexp))) | |
95 (debug-on-quit debug choice) | |
96 ;; fileio.c | |
97 (insert-default-directory minibuffer boolean) | |
98 ;; frame.c | |
99 (default-frame-alist frames | |
100 (repeat (cons :format "%v" | |
101 (symbol :tag "Parameter") | |
102 (sexp :tag "Value")))) | |
103 ;; indent.c | |
104 (indent-tabs-mode fill boolean) | |
105 ;; keyboard.c | |
106 (meta-prefix-char keyboard character) | |
107 (auto-save-interval auto-save integer) | |
108 (auto-save-timeout auto-save (choice (const :tag "off" nil) | |
109 (integer :format "%v"))) | |
110 (echo-keystrokes minibuffer boolean) | |
111 (polling-period keyboard integer) | |
112 (double-click-time mouse integer) | |
113 (inhibit-local-menu-bar-menus menu boolean) | |
114 (help-char keyboard character) | |
115 (help-event-list keyboard (repeat (sexp :format "%v"))) | |
116 (menu-prompting menu boolean) | |
117 (track-mouse mouse boolean) | |
118 (suggest-key-bindings keyboard (choice (const :tag "off" nil) | |
119 (integer :tag "time" 2) | |
120 (sexp :tag "on" | |
121 :format "%t"))) | |
122 ;; lread.c | |
123 (load-path environment | |
18052
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
124 (repeat (choice :tag "[Current dir?]" |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
125 (const :tag " current dir" nil) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
126 (directory :format "%v")))) |
17416 | 127 ;; minibuf.c |
128 (completion-auto-help minibuffer boolean) | |
129 (enable-recursive-minibuffers minibuffer boolean) | |
130 (minibuffer-auto-raise minibuffer boolean) | |
131 ;; process.c | |
18052
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
132 (delete-exited-processes processes-basics boolean) |
17416 | 133 ;; syntax.c |
134 (parse-sexp-ignore-comments editing-basics boolean) | |
135 (words-include-escapes editing-basics boolean) | |
136 ;; window.c | |
137 (temp-buffer-show-function windows function) | |
138 (display-buffer-function windows function) | |
139 (pop-up-frames frames boolean) | |
140 (pop-up-frame-function frames function) | |
141 (special-display-buffer-names | |
142 frames | |
143 (repeat (choice :tag "Buffer" | |
144 :value "" | |
145 (string :format "%v") | |
146 (cons :tag "With attributes" | |
147 :format "%v" | |
148 :value ("" . nil) | |
149 (string :format "%v") | |
150 (repeat :tag "Attributes" | |
151 (cons :format "%v" | |
152 (symbol :tag "Parameter") | |
153 (sexp :tag "Value"))))))) | |
154 (special-display-regexps | |
155 frames | |
156 (repeat (choice :tag "Buffer" | |
157 :value "" | |
158 (regexp :format "%v") | |
159 (cons :tag "With attributes" | |
160 :format "%v" | |
161 :value ("" . nil) | |
162 (regexp :format "%v") | |
163 (repeat :tag "Attributes" | |
164 (cons :format "%v" | |
165 (symbol :tag "Parameter") | |
166 (sexp :tag "Value"))))))) | |
167 (special-display-function frames function) | |
168 (same-window-buffer-names windows (repeat (string :format "%v"))) | |
169 (same-window-regexps windows (repeat (regexp :format "%v"))) | |
170 (pop-up-windows windows boolean) | |
171 (next-screen-context-lines windows boolean) | |
172 (split-height-threshold windows integer) | |
173 (window-min-height windows integer) | |
174 (window-min-width windows integer) | |
175 ;; xdisp.c | |
176 (scroll-step windows integer) | |
177 (truncate-partial-width-windows display boolean) | |
178 (mode-line-inverse-video modeline boolean) | |
179 (line-number-display-limit display integer) | |
180 (highlight-nonselected-windows display boolean) | |
181 (message-log-max debug (choice (const :tag "Disable" nil) | |
182 (integer :menu-tag "lines" | |
183 :format "%v") | |
184 (const :tag "Unlimited" t))) | |
185 ;; xfns.c | |
186 (x-bitmap-file-path installation | |
187 (repeat (directory :format "%v"))))) | |
18052
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
188 this symbol group type |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
189 ;; This function turns a value |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
190 ;; into an expression which produces that value. |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
191 (quoter (lambda (sexp) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
192 (if (or (memq sexp '(t nil)) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
193 (and (symbolp sexp) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
194 (eq (aref (symbol-name sexp) 0) ?:)) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
195 (and (listp sexp) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
196 (memq (car sexp) '(lambda))) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
197 (stringp sexp) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
198 (numberp sexp) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
199 (and (fboundp 'characterp) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
200 (characterp sexp))) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
201 sexp |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
202 (list 'quote sexp))))) |
17416 | 203 (while all |
204 (setq this (car all) | |
205 all (cdr all) | |
206 symbol (nth 0 this) | |
207 group (nth 1 this) | |
208 type (nth 2 this)) | |
209 (if (not (boundp symbol)) | |
210 ;; If variables are removed from C code, give an error here! | |
18052
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
211 (message "Built-in variable `%S' not bound" symbol) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
212 ;; Save the standard value, unless we already did. |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
213 (or (get symbol 'standard-value) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
214 (put symbol 'standard-value |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
215 (list (funcall quoter (default-value symbol))))) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
216 ;; If this is NOT while dumping Emacs, |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
217 ;; set up the rest of the customization info. |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
218 (unless purify-flag |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
219 ;; Add it to the right group. |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
220 (custom-add-to-group group symbol 'custom-variable) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
221 ;; Set the type. |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
222 (put symbol 'custom-type type))))) |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
223 |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
224 ;; Record cus-start as loaded |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
225 ;; if we have set up all the info that we can set up. |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
226 ;; Don't record cus-start as loaded |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
227 ;; if we have set up only the standard values. |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
228 (unless purify-flag |
64a265eaa6d7
Arrange to load it once during dumping,
Richard M. Stallman <rms@gnu.org>
parents:
17948
diff
changeset
|
229 (provide 'cus-start)) |
17416 | 230 |
231 ;;; cus-start.el ends here. |