Mercurial > emacs
comparison lisp/custom.el @ 69925:9319f873855b
(defcustom): Create Common Keywords section in docstring.
(defface, defgroup): Replace definitions of a select few keywords with
a reference to the Common Keywords in defcustom.
(defcustom, defface, defgroup): Replace reference to Customization
chapter in manual with hyperlink.
author | Bill Wohler <wohler@newt.com> |
---|---|
date | Tue, 11 Apr 2006 00:08:56 +0000 |
parents | dc1f0ab7e276 |
children | 8991a6461375 |
comparison
equal
deleted
inserted
replaced
69924:b65913621fc8 | 69925:9319f873855b |
---|---|
201 | 201 |
202 The following keywords are meaningful: | 202 The following keywords are meaningful: |
203 | 203 |
204 :type VALUE should be a widget type for editing the symbol's value. | 204 :type VALUE should be a widget type for editing the symbol's value. |
205 :options VALUE should be a list of valid members of the widget type. | 205 :options VALUE should be a list of valid members of the widget type. |
206 :group VALUE should be a customization group. | |
207 Add SYMBOL to that group. | |
208 :link LINK-DATA | |
209 Include an external link after the documentation string for this | |
210 item. This is a sentence containing an active field which | |
211 references some other documentation. | |
212 | |
213 There are several alternatives you can use for LINK-DATA: | |
214 | |
215 (custom-manual INFO-NODE) | |
216 Link to an Info node; INFO-NODE is a string which specifies | |
217 the node name, as in \"(emacs)Top\". | |
218 | |
219 (info-link INFO-NODE) | |
220 Like `custom-manual' except that the link appears in the | |
221 customization buffer with the Info node name. | |
222 | |
223 (url-link URL) | |
224 Link to a web page; URL is a string which specifies the URL. | |
225 | |
226 (emacs-commentary-link LIBRARY) | |
227 Link to the commentary section of LIBRARY. | |
228 | |
229 (emacs-library-link LIBRARY) | |
230 Link to an Emacs Lisp LIBRARY file. | |
231 | |
232 (file-link FILE) | |
233 Link to FILE. | |
234 | |
235 (function-link FUNCTION) | |
236 Link to the documentation of FUNCTION. | |
237 | |
238 (variable-link VARIABLE) | |
239 Link to the documentation of VARIABLE. | |
240 | |
241 (custom-group-link GROUP) | |
242 Link to another customization GROUP. | |
243 | |
244 You can specify the text to use in the customization buffer by | |
245 adding `:tag NAME' after the first element of the LINK-DATA; for | |
246 example, (info-link :tag \"foo\" \"(emacs)Top\") makes a link to the | |
247 Emacs manual which appears in the buffer as `foo'. | |
248 | |
249 An item can have more than one external link; however, most items | |
250 have none at all. | |
251 :initialize | 206 :initialize |
252 VALUE should be a function used to initialize the | 207 VALUE should be a function used to initialize the |
253 variable. It takes two arguments, the symbol and value | 208 variable. It takes two arguments, the symbol and value |
254 given in the `defcustom' call. The default is | 209 given in the `defcustom' call. The default is |
255 `custom-initialize-reset'. | 210 `custom-initialize-reset'. |
262 is `custom-default-value'. | 217 is `custom-default-value'. |
263 :require | 218 :require |
264 VALUE should be a feature symbol. If you save a value | 219 VALUE should be a feature symbol. If you save a value |
265 for this option, then when your `.emacs' file loads the value, | 220 for this option, then when your `.emacs' file loads the value, |
266 it does (require VALUE) first. | 221 it does (require VALUE) first. |
222 | |
223 The following common keywords are also meaningful. | |
224 | |
225 :group VALUE should be a customization group. | |
226 Add SYMBOL (or FACE with `defface') to that group. | |
227 :link LINK-DATA | |
228 Include an external link after the documentation string for this | |
229 item. This is a sentence containing an active field which | |
230 references some other documentation. | |
231 | |
232 There are several alternatives you can use for LINK-DATA: | |
233 | |
234 (custom-manual INFO-NODE) | |
235 Link to an Info node; INFO-NODE is a string which specifies | |
236 the node name, as in \"(emacs)Top\". | |
237 | |
238 (info-link INFO-NODE) | |
239 Like `custom-manual' except that the link appears in the | |
240 customization buffer with the Info node name. | |
241 | |
242 (url-link URL) | |
243 Link to a web page; URL is a string which specifies the URL. | |
244 | |
245 (emacs-commentary-link LIBRARY) | |
246 Link to the commentary section of LIBRARY. | |
247 | |
248 (emacs-library-link LIBRARY) | |
249 Link to an Emacs Lisp LIBRARY file. | |
250 | |
251 (file-link FILE) | |
252 Link to FILE. | |
253 | |
254 (function-link FUNCTION) | |
255 Link to the documentation of FUNCTION. | |
256 | |
257 (variable-link VARIABLE) | |
258 Link to the documentation of VARIABLE. | |
259 | |
260 (custom-group-link GROUP) | |
261 Link to another customization GROUP. | |
262 | |
263 You can specify the text to use in the customization buffer by | |
264 adding `:tag NAME' after the first element of the LINK-DATA; for | |
265 example, (info-link :tag \"foo\" \"(emacs)Top\") makes a link to the | |
266 Emacs manual which appears in the buffer as `foo'. | |
267 | |
268 An item can have more than one external link; however, most items | |
269 have none at all. | |
267 :version | 270 :version |
268 VALUE should be a string specifying that the variable was | 271 VALUE should be a string specifying that the variable was |
269 first introduced, or its default value was changed, in Emacs | 272 first introduced, or its default value was changed, in Emacs |
270 version VERSION. | 273 version VERSION. |
271 :package-version | 274 :package-version |
290 to load a file defining variables with this form, or with | 293 to load a file defining variables with this form, or with |
291 `defvar' or `defconst', you should always load that file | 294 `defvar' or `defconst', you should always load that file |
292 _outside_ any bindings for these variables. \(`defvar' and | 295 _outside_ any bindings for these variables. \(`defvar' and |
293 `defconst' behave similarly in this respect.) | 296 `defconst' behave similarly in this respect.) |
294 | 297 |
295 Read the section about customization in the Emacs Lisp manual for more | 298 See Info node `(elisp) Customization' in the Emacs Lisp manual |
296 information." | 299 for more information." |
297 (declare (doc-string 3)) | 300 (declare (doc-string 3)) |
298 ;; It is better not to use backquote in this file, | 301 ;; It is better not to use backquote in this file, |
299 ;; because that makes a bootstrapping problem | 302 ;; because that makes a bootstrapping problem |
300 ;; if you need to recompile all the Lisp files using interpreted code. | 303 ;; if you need to recompile all the Lisp files using interpreted code. |
301 (nconc (list 'custom-declare-variable | 304 (nconc (list 'custom-declare-variable |
318 | 321 |
319 The remaining arguments should have the form | 322 The remaining arguments should have the form |
320 | 323 |
321 [KEYWORD VALUE]... | 324 [KEYWORD VALUE]... |
322 | 325 |
323 The following KEYWORDs are defined: | 326 For a list of valid keywords, see the common keywords listed in |
324 | 327 `defcustom'. |
325 :group VALUE should be a customization group. | |
326 Add FACE to that group. | |
327 | 328 |
328 SPEC should be an alist of the form ((DISPLAY ATTS)...). | 329 SPEC should be an alist of the form ((DISPLAY ATTS)...). |
329 | 330 |
330 In the first element, DISPLAY can be :default. The ATTS in that | 331 In the first element, DISPLAY can be :default. The ATTS in that |
331 element then act as defaults for all the following elements. | 332 element then act as defaults for all the following elements. |
372 `supports' (only match frames that support the specified face attributes) | 373 `supports' (only match frames that support the specified face attributes) |
373 Should be a list of face attributes. See the documentation for | 374 Should be a list of face attributes. See the documentation for |
374 the function `display-supports-face-attributes-p' for more | 375 the function `display-supports-face-attributes-p' for more |
375 information on exactly how testing is done. | 376 information on exactly how testing is done. |
376 | 377 |
377 Read the section about customization in the Emacs Lisp manual for more | 378 See Info node `(elisp) Customization' in the Emacs Lisp manual |
378 information." | 379 for more information." |
379 (declare (doc-string 3)) | 380 (declare (doc-string 3)) |
380 ;; It is better not to use backquote in this file, | 381 ;; It is better not to use backquote in this file, |
381 ;; because that makes a bootstrapping problem | 382 ;; because that makes a bootstrapping problem |
382 ;; if you need to recompile all the Lisp files using interpreted code. | 383 ;; if you need to recompile all the Lisp files using interpreted code. |
383 (nconc (list 'custom-declare-face (list 'quote face) spec doc) args)) | 384 (nconc (list 'custom-declare-face (list 'quote face) spec doc) args)) |
430 | 431 |
431 The remaining arguments should have the form | 432 The remaining arguments should have the form |
432 | 433 |
433 [KEYWORD VALUE]... | 434 [KEYWORD VALUE]... |
434 | 435 |
435 The following KEYWORDs are defined: | 436 For a list of valid keywords, see the common keywords listed in |
436 | 437 `defcustom'. |
437 :group VALUE should be a customization group. | 438 |
438 Add SYMBOL to that group. | 439 See Info node `(elisp) Customization' in the Emacs Lisp manual |
439 | 440 for more information." |
440 :version VALUE should be a string specifying that the group was introduced | |
441 in Emacs version VERSION. | |
442 | |
443 Read the section about customization in the Emacs Lisp manual for more | |
444 information." | |
445 (declare (doc-string 3)) | 441 (declare (doc-string 3)) |
446 ;; It is better not to use backquote in this file, | 442 ;; It is better not to use backquote in this file, |
447 ;; because that makes a bootstrapping problem | 443 ;; because that makes a bootstrapping problem |
448 ;; if you need to recompile all the Lisp files using interpreted code. | 444 ;; if you need to recompile all the Lisp files using interpreted code. |
449 (nconc (list 'custom-declare-group (list 'quote symbol) members doc) args)) | 445 (nconc (list 'custom-declare-group (list 'quote symbol) members doc) args)) |