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