Mercurial > hg > xemacs-beta
comparison lisp/cus-start.el @ 219:262b8bb4a523 r20-4b8
Import from CVS: tag r20-4b8
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:09:35 +0200 |
parents | 41ff10fd062f |
children | 2c611d1463a6 |
comparison
equal
deleted
inserted
replaced
218:c9f226976f56 | 219:262b8bb4a523 |
---|---|
40 | 40 |
41 | 41 |
42 ;;; Code: | 42 ;;; Code: |
43 | 43 |
44 (require 'custom) | 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 | 45 |
61 (let ((all '(;; boolean | 46 (let ((all '(;; boolean |
62 (abbrev-all-caps abbrev boolean) | 47 (abbrev-all-caps abbrev boolean) |
63 (allow-deletion-of-last-visible-frame frames boolean) | 48 (allow-deletion-of-last-visible-frame frames boolean) |
64 (debug-on-quit debug boolean) | 49 (debug-on-quit debug boolean) |
140 ;; customizable: | 125 ;; customizable: |
141 (bar-cursor display (choice (const :tag "Block Cursor" nil) | 126 (bar-cursor display (choice (const :tag "Block Cursor" nil) |
142 (const :tag "Bar Cursor (1 pixel)" t) | 127 (const :tag "Bar Cursor (1 pixel)" t) |
143 (sexp :tag "Bar Cursor (2 pixels)" | 128 (sexp :tag "Bar Cursor (2 pixels)" |
144 :format "%t\n" 'other))) | 129 :format "%t\n" 'other))) |
145 (default-frame-plist frames (repeat | 130 (default-frame-plist frames plist) |
146 (list :inline t | 131 (default-tty-frame-plist frames plist) |
147 :format "%v" | 132 (default-x-frame-plist frames plist) |
148 (symbol :tag "Parameter") | |
149 (sexp :tag "Value")))) | |
150 (disable-auto-save-when-buffer-shrinks auto-save boolean) | 133 (disable-auto-save-when-buffer-shrinks auto-save boolean) |
151 (find-file-use-truenames find-file boolean) | 134 (find-file-use-truenames find-file boolean) |
152 (find-file-compare-truenames find-file boolean) | 135 (find-file-compare-truenames find-file boolean) |
153 (focus-follows-mouse x boolean) | 136 (focus-follows-mouse x boolean) |
154 (help-char keyboard (choice character | 137 (help-char keyboard (choice character |
177 ;; These are from replace.el, which is loaded too early | 160 ;; These are from replace.el, which is loaded too early |
178 ;; to be customizable. | 161 ;; to be customizable. |
179 (case-replace matching boolean) | 162 (case-replace matching boolean) |
180 (query-replace-highlight matching boolean) | 163 (query-replace-highlight matching boolean) |
181 (list-matching-lines-default-context-lines matching integer))) | 164 (list-matching-lines-default-context-lines matching integer))) |
182 this symbol group type) | 165 this symbol group type |
183 (while all | 166 (quoter (lambda (sexp) |
167 ;; A copy of `custom-quote' | |
168 (if (or (memq sexp '(t nil)) | |
169 (keywordp sexp) | |
170 (eq (car-safe sexp) 'lambda) | |
171 (stringp sexp) | |
172 (numberp sexp) | |
173 (characterp sexp)) | |
174 sexp | |
175 (list 'quote sexp))))) | |
176 (while all | |
184 (setq this (car all) | 177 (setq this (car all) |
185 all (cdr all) | 178 all (cdr all) |
186 symbol (nth 0 this) | 179 symbol (nth 0 this) |
187 group (nth 1 this) | 180 group (nth 1 this) |
188 type (nth 2 this)) | 181 type (nth 2 this)) |
191 (if (fboundp 'message) | 184 (if (fboundp 'message) |
192 ;; If variables are removed from C code, give an error here! | 185 ;; If variables are removed from C code, give an error here! |
193 (message "Intrinsic `%S' not bound" symbol)) | 186 (message "Intrinsic `%S' not bound" symbol)) |
194 ;; This is called before any user can have changed the value. | 187 ;; This is called before any user can have changed the value. |
195 (put symbol 'standard-value | 188 (put symbol 'standard-value |
196 (list (custom-start-quote (default-value symbol)))) | 189 (list (funcall quoter (default-value symbol)))) |
197 ;; Add it to the right group. | 190 ;; Add it to the right group. |
198 (custom-add-to-group group symbol 'custom-variable) | 191 (custom-add-to-group group symbol 'custom-variable) |
199 ;; Set the type. | 192 ;; Set the type. |
200 (put symbol 'custom-type type)))) | 193 (put symbol 'custom-type type)))) |
201 | 194 |