comparison lisp/prim/cus-start.el @ 124:9b50b4588a93 r20-1b15

Import from CVS: tag r20-1b15
author cvs
date Mon, 13 Aug 2007 09:26:39 +0200
parents
children 1856695b1fa9
comparison
equal deleted inserted replaced
123:c77884c6318d 124:9b50b4588a93
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.
32 (let ((all '(;; abbrev.c
33 (abbrev-all-caps abbrev-mode boolean)
34 (pre-abbrev-expand-hook abbrev-mode hook)
35 ;; alloc.c
36 (gc-cons-threshold alloc integer)
37 ;; buffer.c
38 (modeline-format modeline sexp) ;Hard to do right.
39 (default-major-mode internal function)
40 (case-fold-search matching boolean)
41 (fill-column fill integer)
42 (left-margin fill integer)
43 (tab-width editing-basics integer)
44 (ctl-arrow display boolean)
45 (truncate-lines display boolean)
46 (selective-display display
47 (choice (const :tag "off" nil)
48 (integer :tag "space"
49 :format "%v"
50 1)
51 (const :tag "on" t)))
52 (selective-display-ellipses display boolean)
53 ;; callproc.c
54 (shell-file-name execute file)
55 (exec-path execute
56 (repeat (choice (const :tag "default" nil)
57 (file :format "%v"))))
58 ;; dired.c
59 (completion-ignored-extensions dired
60 (repeat (string :format "%v")))
61 ;; dispnew.el
62 (visible-bell display boolean)
63 (no-redraw-on-reenter display boolean)
64 ;; eval.c
65 (max-specpdl-size limits integer)
66 (max-lisp-eval-depth limits integer)
67 (stack-trace-on-error debug
68 (choice (const :tag "off")
69 (repeat :menu-tag "When"
70 :value (nil)
71 (symbol :format "%v"))
72 (const :tag "always" t)))
73 (debug-on-error debug
74 (choice (const :tag "off")
75 (repeat :menu-tag "When"
76 :value (nil)
77 (symbol :format "%v"))
78 (const :tag "always" t)))
79 (debug-on-quit debug choice)
80 ;; frame.c
81 (default-frame-plist frames
82 (repeat (cons :format "%v"
83 (symbol :tag "Parameter")
84 (sexp :tag "Value"))))
85 ;; indent.c
86 (indent-tabs-mode fill boolean)
87 ;; keyboard.c
88 (meta-prefix-char keyboard character)
89 (auto-save-interval auto-save integer)
90 (echo-keystrokes minibuffer boolean)
91 (help-char keyboard character)
92 ;; lread.c
93 (load-path environment
94 (repeat (choice :tag "Directory"
95 (const :tag "default" nil)
96 (directory :format "%v"))))
97 ;; process.c
98 (delete-exited-processes proces-basics boolean)
99 ;; syntax.c
100 (parse-sexp-ignore-comments editing-basics boolean)
101 (words-include-escapes editing-basics boolean)
102 ;; window.c
103 (temp-buffer-show-function windows function)
104 (next-screen-context-lines windows boolean)
105 (window-min-height windows integer)
106 (window-min-width windows integer)
107 ;; xdisp.c
108 (scroll-step windows integer)
109 (truncate-partial-width-windows display boolean)
110 ;; xfns.c
111 (x-bitmap-file-path installation
112 (repeat (directory :format "%v")))))
113 this symbol group type)
114 (while all
115 (setq this (car all)
116 all (cdr all)
117 symbol (nth 0 this)
118 group (nth 1 this)
119 type (nth 2 this))
120 (if (not (boundp symbol))
121 ;; This is loaded so early, there is no message
122 (if (fboundp 'message)
123 ;; If variables are removed from C code, give an error here!
124 (message "Intrinsic `%S' not bound" symbol))
125 ;; This is called before any user can have changed the value.
126 (put symbol 'factory-value
127 (list (custom-start-quote (default-value symbol))))
128 ;; Add it to the right group.
129 (custom-add-to-group group symbol 'custom-variable)
130 ;; Set the type.
131 (put symbol 'custom-type type))))
132
133 ;; This is to prevent it from being reloaded by `cus-load.el'.
134 (provide 'cus-start)
135
136 ;;; cus-start.el ends here.