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
|
|
8 ;;; Commentary:
|
|
9 ;;
|
|
10 ;; Must be run before the user has changed the value of any options!
|
|
11
|
|
12 ;;; Code:
|
|
13
|
|
14 (require 'custom)
|
|
15
|
|
16 (defun custom-start-quote (sexp)
|
|
17 ;; This is copied from `cus-edit.el'.
|
|
18 "Quote SEXP iff it is not self quoting."
|
|
19 (if (or (memq sexp '(t nil))
|
|
20 (and (symbolp sexp)
|
|
21 (eq (aref (symbol-name sexp) 0) ?:))
|
|
22 (and (listp sexp)
|
|
23 (memq (car sexp) '(lambda)))
|
|
24 (stringp sexp)
|
|
25 (numberp sexp)
|
|
26 (and (fboundp 'characterp)
|
|
27 (characterp sexp)))
|
|
28 sexp
|
|
29 (list 'quote sexp)))
|
|
30
|
|
31 ;; The file names below are unreliable, as they are from Emacs 19.34.
|
142
|
32 (let ((all '(;; boolean
|
|
33 (abbrev-all-caps abbrev boolean)
|
|
34 (allow-deletion-of-last-visible-frame frames boolean)
|
|
35 (debug-on-quit debug boolean)
|
|
36 (delete-auto-save-files auto-save boolean)
|
|
37 (delete-exited-processes processes-basics boolean)
|
|
38 (indent-tabs-mode editing-basics boolean)
|
|
39 (load-ignore-elc-files maint boolean)
|
|
40 (load-warn-when-source-newer maint boolean)
|
|
41 (load-warn-when-source-only maint boolean)
|
|
42 (modifier-keys-are-sticky keyboard boolean)
|
|
43 (no-redraw-on-reenter display boolean)
|
|
44 (scroll-on-clipped-lines display boolean)
|
|
45 (truncate-partial-width-windows display boolean)
|
|
46 (visible-bell sound boolean)
|
|
47 (x-allow-sendevents x boolean)
|
|
48 (zmacs-regions editing-basics boolean)
|
|
49 ;; integer
|
|
50 (auto-save-interval auto-save integer)
|
|
51 (bell-volume sound integer)
|
|
52 (echo-keystrokes keyboard integer)
|
124
|
53 (gc-cons-threshold alloc integer)
|
142
|
54 (next-screen-context-lines display integer)
|
|
55 (scroll-step windows integer)
|
|
56 (window-min-height windows integer)
|
|
57 (window-min-width windows integer)
|
|
58 ;; object
|
|
59 (auto-save-file-format auto-save
|
|
60 (choice (const :tag "Normal" t)
|
|
61 (repeat (symbol :tag "Format"))))
|
|
62 (completion-ignored-extensions minibuffer
|
|
63 (repeat
|
|
64 (string :format "%v")))
|
|
65 (debug-on-error debug (choice (const :tag "off" nil)
|
|
66 (const :tag "Always" t)
|
|
67 (repeat :menu-tag "When"
|
|
68 :value (nil)
|
|
69 (symbol
|
|
70 :tag "Condition"))))
|
|
71 (debug-on-signal debug (choice (const :tag "off" nil)
|
|
72 (const :tag "Always" t)
|
|
73 (repeat :menu-tag "When"
|
|
74 :value (nil)
|
|
75 (symbol
|
|
76 :tag "Condition"))))
|
|
77 (exec-path processes-basics (repeat
|
|
78 (choice :tag "Directory"
|
|
79 (const :tag "Default" nil)
|
|
80 (directory :format "%v"))))
|
|
81 (file-name-handler-alist data (repeat
|
|
82 (cons regexp
|
|
83 (function :tag "Handler"))))
|
|
84 (shell-file-name execute file)
|
|
85 (stack-trace-on-error debug (choice (const :tag "off" nil)
|
|
86 (const :tag "Always" t)
|
|
87 (repeat :menu-tag "When"
|
|
88 :value (nil)
|
|
89 (symbol
|
|
90 :tag "Condition"))))
|
|
91 (stack-trace-on-signal debug (choice (const :tag "off" nil)
|
|
92 (const :tag "Always" t)
|
|
93 (repeat :menu-tag "When"
|
|
94 :value (nil)
|
|
95 (symbol
|
|
96 :tag "Condition"))))
|
|
97 ;; buffer-local
|
124
|
98 (case-fold-search matching boolean)
|
142
|
99 (ctl-arrow display (choice (integer 160)
|
|
100 (sexp :tag "160 (default)"
|
|
101 :format "%t\n")))
|
124
|
102 (fill-column fill integer)
|
|
103 (left-margin fill integer)
|
|
104 (tab-width editing-basics integer)
|
|
105 (truncate-lines display boolean)
|
142
|
106 ;; not documented as user-options, but should still be
|
|
107 ;; customizable:
|
|
108 (default-frame-plist frames (repeat
|
|
109 (list :inline t
|
|
110 :format "%v"
|
|
111 (symbol :tag "Parameter")
|
|
112 (sexp :tag "Value"))))
|
|
113 (help-char keyboard character)
|
|
114 (max-lisp-eval-depth limits integer)
|
|
115 (max-specpdl-size limits integer)
|
|
116 (meta-prefix-char keyboard character)
|
|
117 (parse-sexp-ignore-comments editing-basics boolean)
|
124
|
118 (selective-display display
|
|
119 (choice (const :tag "off" nil)
|
|
120 (integer :tag "space"
|
|
121 :format "%v"
|
|
122 1)
|
|
123 (const :tag "on" t)))
|
|
124 (selective-display-ellipses display boolean)
|
142
|
125 (signal-error-on-buffer-boundary internal boolean)
|
124
|
126 (words-include-escapes editing-basics boolean)
|
142
|
127 (temp-buffer-show-function
|
|
128 windows (radio (function-item :tag "Temp Buffers Always in Same Frame"
|
|
129 :format "%t\n"
|
|
130 show-temp-buffer-in-current-frame)
|
|
131 (const :tag "Temp Buffers Like Other Buffers" nil)
|
|
132 (function :tag "Other")))))
|
124
|
133 this symbol group type)
|
|
134 (while all
|
|
135 (setq this (car all)
|
|
136 all (cdr all)
|
|
137 symbol (nth 0 this)
|
|
138 group (nth 1 this)
|
|
139 type (nth 2 this))
|
|
140 (if (not (boundp symbol))
|
|
141 ;; This is loaded so early, there is no message
|
|
142 (if (fboundp 'message)
|
|
143 ;; If variables are removed from C code, give an error here!
|
|
144 (message "Intrinsic `%S' not bound" symbol))
|
|
145 ;; This is called before any user can have changed the value.
|
153
|
146 (put symbol 'standard-value
|
124
|
147 (list (custom-start-quote (default-value symbol))))
|
|
148 ;; Add it to the right group.
|
|
149 (custom-add-to-group group symbol 'custom-variable)
|
|
150 ;; Set the type.
|
|
151 (put symbol 'custom-type type))))
|
|
152
|
|
153 ;; This is to prevent it from being reloaded by `cus-load.el'.
|
|
154 (provide 'cus-start)
|
|
155
|
|
156 ;;; cus-start.el ends here.
|