comparison lisp/custom/custom-edit.el @ 102:a145efe76779 r20-1b3

Import from CVS: tag r20-1b3
author cvs
date Mon, 13 Aug 2007 09:15:49 +0200
parents 4be1180a9e89
children
comparison
equal deleted inserted replaced
101:a0ec055d74dd 102:a145efe76779
2 ;; 2 ;;
3 ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. 3 ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc.
4 ;; 4 ;;
5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> 5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
6 ;; Keywords: help, faces 6 ;; Keywords: help, faces
7 ;; Version: 1.44 7 ;; Version: 1.46
8 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ 8 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
9 9
10 ;;; Commentary: 10 ;;; Commentary:
11 ;; 11 ;;
12 ;; See `custom.el'. 12 ;; See `custom.el'.
19 19
20 (define-widget-keywords :custom-prefixes :custom-menu :custom-show 20 (define-widget-keywords :custom-prefixes :custom-menu :custom-show
21 :custom-magic :custom-state :custom-level :custom-form 21 :custom-magic :custom-state :custom-level :custom-form
22 :custom-set :custom-save :custom-reset-current :custom-reset-saved 22 :custom-set :custom-save :custom-reset-current :custom-reset-saved
23 :custom-reset-factory) 23 :custom-reset-factory)
24
25 ;;; Customization Groups.
26
27 (defgroup emacs nil
28 "Customization of the One True Editor."
29 :link '(custom-manual "(emacs)Top"))
30
31 ;; Most of these groups are stolen from `finder.el',
32 (defgroup editing nil
33 "Basic text editing facilities."
34 :group 'emacs)
35
36 (defgroup abbrev nil
37 "Abbreviation handling, typing shortcuts, macros."
38 :tag "Abbreviations"
39 :group 'editing)
40
41 (defgroup matching nil
42 "Various sorts of searching and matching."
43 :group 'editing)
44
45 (defgroup emulations nil
46 "Emulations of other editors."
47 :group 'editing)
48
49 (defgroup mouse nil
50 "Mouse support."
51 :group 'editing)
52
53 (defgroup outlines nil
54 "Support for hierarchical outlining."
55 :group 'editing)
56
57 (defgroup external nil
58 "Interfacing to external utilities."
59 :group 'emacs)
60
61 (defgroup bib nil
62 "Code related to the `bib' bibliography processor."
63 :tag "Bibliography"
64 :group 'external)
65
66 (defgroup processes nil
67 "Process, subshell, compilation, and job control support."
68 :group 'external
69 :group 'development)
70
71 (defgroup programming nil
72 "Support for programming in other languages."
73 :group 'emacs)
74
75 (defgroup languages nil
76 "Specialized modes for editing programming languages."
77 :group 'programming)
78
79 (defgroup lisp nil
80 "Lisp support, including Emacs Lisp."
81 :group 'languages
82 :group 'development)
83
84 (defgroup c nil
85 "Support for the C language and related languages."
86 :group 'languages)
87
88 (defgroup tools nil
89 "Programming tools."
90 :group 'programming)
91
92 (defgroup oop nil
93 "Support for object-oriented programming."
94 :group 'programming)
95
96 (defgroup applications nil
97 "Applications written in Emacs."
98 :group 'emacs)
99
100 (defgroup calendar nil
101 "Calendar and time management support."
102 :group 'applications)
103
104 (defgroup mail nil
105 "Modes for electronic-mail handling."
106 :group 'applications)
107
108 (defgroup news nil
109 "Support for netnews reading and posting."
110 :group 'applications)
111
112 (defgroup games nil
113 "Games, jokes and amusements."
114 :group 'applications)
115
116 (defgroup development nil
117 "Support for further development of Emacs."
118 :group 'emacs)
119
120 (defgroup docs nil
121 "Support for Emacs documentation."
122 :group 'development)
123
124 (defgroup extensions nil
125 "Emacs Lisp language extensions."
126 :group 'development)
127
128 (defgroup internal nil
129 "Code for Emacs internals, build process, defaults."
130 :group 'development)
131
132 (defgroup maint nil
133 "Maintenance aids for the Emacs development group."
134 :tag "Maintenance"
135 :group 'development)
136
137 (defgroup environment nil
138 "Fitting Emacs with its environment."
139 :group 'emacs)
140
141 (defgroup comm nil
142 "Communications, networking, remote access to files."
143 :tag "Communication"
144 :group 'environment)
145
146 (defgroup hardware nil
147 "Support for interfacing with exotic hardware."
148 :group 'environment)
149
150 (defgroup terminals nil
151 "Support for terminal types."
152 :group 'environment)
153
154 (defgroup unix nil
155 "Front-ends/assistants for, or emulators of, UNIX features."
156 :group 'environment)
157
158 (defgroup vms nil
159 "Support code for vms."
160 :group 'environment)
161
162 (defgroup i18n nil
163 "Internationalization and alternate character-set support."
164 :group 'environment
165 :group 'editing)
166
167 (defgroup frames nil
168 "Support for Emacs frames and window systems."
169 :group 'environment)
170
171 (defgroup data nil
172 "Support editing files of data."
173 :group 'emacs)
174
175 (defgroup wp nil
176 "Word processing."
177 :group 'emacs)
178
179 (defgroup tex nil
180 "Code related to the TeX formatter."
181 :group 'wp)
182
183 (defgroup faces nil
184 "Support for multiple fonts."
185 :group 'emacs)
186
187 (defgroup hypermedia nil
188 "Support for links between text or other media types."
189 :group 'emacs)
190
191 (defgroup help nil
192 "Support for on-line help systems."
193 :group 'emacs)
194
195 (defgroup local nil
196 "Code local to your site."
197 :group 'emacs)
198
199 (defgroup customize '((widgets custom-group))
200 "Customization of the Customization support."
201 :link '(custom-manual "(custom)Top")
202 :link '(url-link :tag "Development Page"
203 "http://www.dina.kvl.dk/~abraham/custom/")
204 :prefix "custom-"
205 :group 'help
206 :group 'faces)
24 207
25 ;;; Utilities. 208 ;;; Utilities.
26 209
27 (defun custom-quote (sexp) 210 (defun custom-quote (sexp)
28 "Quote SEXP iff it is not self quoting." 211 "Quote SEXP iff it is not self quoting."
259 (list (if (equal val "") 442 (list (if (equal val "")
260 v (intern val))))) 443 v (intern val)))))
261 (custom-buffer-create (list (list symbol 'custom-variable)))) 444 (custom-buffer-create (list (list symbol 'custom-variable))))
262 445
263 ;;;###autoload 446 ;;;###autoload
264 (defun customize-face (symbol) 447 (defun customize-face (&optional symbol)
265 "Customize FACE." 448 "Customize SYMBOL, which should be a face name or nil.
266 (interactive (list (completing-read "Customize face: " 449 If SYMBOL is nil, customize all faces."
450 (interactive (list (completing-read "Customize face: (default all) "
267 obarray 'custom-facep))) 451 obarray 'custom-facep)))
268 (if (stringp symbol) 452 (if (or (null symbol) (and (stringp symbol) (zerop (length symbol))))
269 (setq symbol (intern symbol))) 453 (let ((found nil))
270 (unless (symbolp symbol) 454 (message "Looking for faces...")
271 (error "Should be a symbol %S" symbol)) 455 (mapcar (lambda (symbol)
272 (custom-buffer-create (list (list symbol 'custom-face)))) 456 (setq found (cons (list symbol 'custom-face) found)))
457 (face-list))
458 (message "Creating customization buffer...")
459 (custom-buffer-create found))
460 (if (stringp symbol)
461 (setq symbol (intern symbol)))
462 (unless (symbolp symbol)
463 (error "Should be a symbol %S" symbol))
464 (custom-buffer-create (list (list symbol 'custom-face)))))
273 465
274 ;;;###autoload 466 ;;;###autoload
275 (defun customize-customized () 467 (defun customize-customized ()
276 "Customize all already customized user options." 468 "Customize all already customized user options."
277 (interactive) 469 (interactive)