Mercurial > hg > xemacs-beta
comparison lisp/cus-start.el @ 209:41ff10fd062f r20-4b3
Import from CVS: tag r20-4b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:04:58 +0200 |
parents | |
children | 262b8bb4a523 |
comparison
equal
deleted
inserted
replaced
208:f427b8ec4379 | 209:41ff10fd062f |
---|---|
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 ;; Maintainer: XEmacs Development Team | |
7 ;; Keywords: internal, dumped | |
8 | |
9 ;; This file is part of XEmacs. | |
10 | |
11 ;; XEmacs is free software; you can redistribute it and/or modify it | |
12 ;; under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; XEmacs is distributed in the hope that it will be useful, but | |
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
19 ;; General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free | |
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
24 ;; 02111-1307, USA. | |
25 | |
26 ;;; Synched up with: Not synched with FSF. | |
27 | |
28 ;;; Commentary: | |
29 | |
30 ;; This file is dumped with XEmacs. | |
31 | |
32 ;; The following code is used to define the customization properties | |
33 ;; for builtin variables, and variables in the packages that are | |
34 ;; preloaded /very/ early, before custom.el itself (replace.el is such | |
35 ;; an example). The way it handles custom stuff is dirty, and should | |
36 ;; be regarded as a last resort. DO NOT add variables here, unless | |
37 ;; you know what you are doing. | |
38 | |
39 ;; Must be run before the user has changed the value of any options! | |
40 | |
41 | |
42 ;;; Code: | |
43 | |
44 (require 'custom) | |
45 | |
46 (defun custom-start-quote (sexp) | |
47 ;; This is copied from `cus-edit.el'. | |
48 "Quote SEXP iff it is not self quoting." | |
49 (if (or (memq sexp '(t nil)) | |
50 (and (symbolp sexp) | |
51 (eq (aref (symbol-name sexp) 0) ?:)) | |
52 (and (listp sexp) | |
53 (memq (car sexp) '(lambda))) | |
54 (stringp sexp) | |
55 (numberp sexp) | |
56 (and (fboundp 'characterp) | |
57 (characterp sexp))) | |
58 sexp | |
59 (list 'quote sexp))) | |
60 | |
61 (let ((all '(;; boolean | |
62 (abbrev-all-caps abbrev boolean) | |
63 (allow-deletion-of-last-visible-frame frames boolean) | |
64 (debug-on-quit debug boolean) | |
65 (delete-auto-save-files auto-save boolean) | |
66 (delete-exited-processes processes-basics boolean) | |
67 (indent-tabs-mode editing-basics boolean) | |
68 (load-ignore-elc-files maint boolean) | |
69 (load-warn-when-source-newer maint boolean) | |
70 (load-warn-when-source-only maint boolean) | |
71 (modifier-keys-are-sticky keyboard boolean) | |
72 (no-redraw-on-reenter display boolean) | |
73 (scroll-on-clipped-lines display boolean) | |
74 (truncate-partial-width-windows display boolean) | |
75 (visible-bell sound boolean) | |
76 (x-allow-sendevents x boolean) | |
77 (zmacs-regions editing-basics boolean) | |
78 ;; integer | |
79 (auto-save-interval auto-save integer) | |
80 (bell-volume sound integer) | |
81 (echo-keystrokes keyboard integer) | |
82 (gc-cons-threshold alloc integer) | |
83 (next-screen-context-lines display integer) | |
84 (scroll-conservatively display integer) | |
85 (scroll-step windows integer) | |
86 (window-min-height windows integer) | |
87 (window-min-width windows integer) | |
88 ;; object | |
89 (auto-save-file-format auto-save | |
90 (choice (const :tag "Normal" t) | |
91 (repeat (symbol :tag "Format")))) | |
92 (completion-ignored-extensions minibuffer | |
93 (repeat | |
94 (string :format "%v"))) | |
95 (debug-ignored-errors debug (repeat (choice :format "%v" | |
96 (symbol :tag "Class") | |
97 regexp))) | |
98 (debug-on-error debug (choice (const :tag "off" nil) | |
99 (const :tag "Always" t) | |
100 (repeat :menu-tag "When" | |
101 :value (nil) | |
102 (symbol | |
103 :tag "Condition")))) | |
104 (debug-on-signal debug (choice (const :tag "off" nil) | |
105 (const :tag "Always" t) | |
106 (repeat :menu-tag "When" | |
107 :value (nil) | |
108 (symbol | |
109 :tag "Condition")))) | |
110 (exec-path processes-basics (repeat | |
111 (choice :tag "Directory" | |
112 (const :tag "Default" nil) | |
113 (directory :format "%v")))) | |
114 (file-name-handler-alist data (repeat | |
115 (cons regexp | |
116 (function :tag "Handler")))) | |
117 (shell-file-name execute file) | |
118 (stack-trace-on-error debug (choice (const :tag "off" nil) | |
119 (const :tag "Always" t) | |
120 (repeat :menu-tag "When" | |
121 :value (nil) | |
122 (symbol | |
123 :tag "Condition")))) | |
124 (stack-trace-on-signal debug (choice (const :tag "off" nil) | |
125 (const :tag "Always" t) | |
126 (repeat :menu-tag "When" | |
127 :value (nil) | |
128 (symbol | |
129 :tag "Condition")))) | |
130 ;; buffer-local | |
131 (case-fold-search matching boolean) | |
132 (ctl-arrow display (choice (integer 160) | |
133 (sexp :tag "160 (default)" | |
134 :format "%t\n"))) | |
135 (fill-column fill integer) | |
136 (left-margin fill integer) | |
137 (tab-width editing-basics integer) | |
138 (truncate-lines display boolean) | |
139 ;; not documented as user-options, but should still be | |
140 ;; customizable: | |
141 (bar-cursor display (choice (const :tag "Block Cursor" nil) | |
142 (const :tag "Bar Cursor (1 pixel)" t) | |
143 (sexp :tag "Bar Cursor (2 pixels)" | |
144 :format "%t\n" 'other))) | |
145 (default-frame-plist frames (repeat | |
146 (list :inline t | |
147 :format "%v" | |
148 (symbol :tag "Parameter") | |
149 (sexp :tag "Value")))) | |
150 (disable-auto-save-when-buffer-shrinks auto-save boolean) | |
151 (find-file-use-truenames find-file boolean) | |
152 (find-file-compare-truenames find-file boolean) | |
153 (focus-follows-mouse x boolean) | |
154 (help-char keyboard (choice character | |
155 (sexp :tag "Single key specifier"))) | |
156 (max-lisp-eval-depth limits integer) | |
157 (max-specpdl-size limits integer) | |
158 (meta-prefix-char keyboard character) | |
159 (parse-sexp-ignore-comments editing-basics boolean) | |
160 (selective-display display | |
161 (choice (const :tag "off" nil) | |
162 (integer :tag "space" | |
163 :format "%v" | |
164 1) | |
165 (const :tag "on" t))) | |
166 (selective-display-ellipses display boolean) | |
167 (signal-error-on-buffer-boundary internal boolean) | |
168 (temp-buffer-show-function | |
169 windows (radio (function-item :tag "Temp Buffers Always in Same Frame" | |
170 :format "%t\n" | |
171 show-temp-buffer-in-current-frame) | |
172 (const :tag "Temp Buffers Like Other Buffers" nil) | |
173 (function :tag "Other"))) | |
174 (undo-threshold undo integer) | |
175 (undo-high-threshold undo integer) | |
176 (words-include-escapes editing-basics boolean) | |
177 ;; These are from replace.el, which is loaded too early | |
178 ;; to be customizable. | |
179 (case-replace matching boolean) | |
180 (query-replace-highlight matching boolean) | |
181 (list-matching-lines-default-context-lines matching integer))) | |
182 this symbol group type) | |
183 (while all | |
184 (setq this (car all) | |
185 all (cdr all) | |
186 symbol (nth 0 this) | |
187 group (nth 1 this) | |
188 type (nth 2 this)) | |
189 (if (not (boundp symbol)) | |
190 ;; This is loaded so early, there is no message | |
191 (if (fboundp 'message) | |
192 ;; If variables are removed from C code, give an error here! | |
193 (message "Intrinsic `%S' not bound" symbol)) | |
194 ;; This is called before any user can have changed the value. | |
195 (put symbol 'standard-value | |
196 (list (custom-start-quote (default-value symbol)))) | |
197 ;; Add it to the right group. | |
198 (custom-add-to-group group symbol 'custom-variable) | |
199 ;; Set the type. | |
200 (put symbol 'custom-type type)))) | |
201 | |
202 ;; This is to prevent it from being reloaded by `cus-load.el'. | |
203 (provide 'cus-start) | |
204 | |
205 ;;; cus-start.el ends here. |