diff options
| author | Chong Yidong | 2012-09-18 13:14:42 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-09-18 13:14:42 +0800 |
| commit | ed1f0bd388e83e5ee065f7dde0f52bbfe9031933 (patch) | |
| tree | 7b0251ea23f7191194f5f0739ae43975e56c3db6 /lisp | |
| parent | a11035b8cd0ef80bc118cc97be53373b36475da0 (diff) | |
| download | emacs-ed1f0bd388e83e5ee065f7dde0f52bbfe9031933.tar.gz emacs-ed1f0bd388e83e5ee065f7dde0f52bbfe9031933.zip | |
Doc fixes for defface and friends.
* lisp/cus-edit.el (custom-unlispify-remove-prefixes): Add warning.
* lisp/custom.el (defface): Doc fix.
* doc/lispref/customize.texi (Customization): Define customization more
carefully.
(Common Keywords): Add xref to Constant Variables.
* doc/lispref/display.texi (Faces): Discuss anonymous faces.
(Face Attributes): Tweak intro.
(Defining Faces): Move after the Face Attributes node. Copyedits.
(Displaying Faces): Describe role of inheritance.
* doc/lispref/variables.texi (Defining Variables): Link to defcustom's node
instead of the higher-level Customization chapter.
Fixes: debbugs:11440
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 5 | ||||
| -rw-r--r-- | lisp/custom.el | 110 |
3 files changed, 62 insertions, 59 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c1c9e5ee1c8..7ed5f6af14b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-09-18 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * custom.el (defface): Doc fix. | ||
| 4 | |||
| 5 | * cus-edit.el (custom-unlispify-remove-prefixes): Add warning. | ||
| 6 | |||
| 1 | 2012-09-18 Martin Blais <blais@furius.ca> (tiny change) | 7 | 2012-09-18 Martin Blais <blais@furius.ca> (tiny change) |
| 2 | 8 | ||
| 3 | * progmodes/compile.el (compilation-start): Use compilation-always-kill | 9 | * progmodes/compile.el (compilation-start): Use compilation-always-kill |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 86a19131569..2e6f2b14625 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -526,7 +526,10 @@ WIDGET is the widget to apply the filter entries of MENU on." | |||
| 526 | :type 'boolean) | 526 | :type 'boolean) |
| 527 | 527 | ||
| 528 | (defcustom custom-unlispify-remove-prefixes nil | 528 | (defcustom custom-unlispify-remove-prefixes nil |
| 529 | "Non-nil means remove group prefixes from option names in buffer." | 529 | "Non-nil means remove group prefixes from option names in buffer. |
| 530 | Discarding prefixes often leads to confusing names for options | ||
| 531 | and faces in Customize buffers, so do not set this to a non-nil | ||
| 532 | value unless you are sure you know what it does." | ||
| 530 | :group 'custom-menu | 533 | :group 'custom-menu |
| 531 | :group 'custom-buffer | 534 | :group 'custom-buffer |
| 532 | :type 'boolean) | 535 | :type 'boolean) |
diff --git a/lisp/custom.el b/lisp/custom.el index 01b0e6d1650..dfc8e631152 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -350,68 +350,62 @@ FACE does not need to be quoted. | |||
| 350 | 350 | ||
| 351 | Third argument DOC is the face documentation. | 351 | Third argument DOC is the face documentation. |
| 352 | 352 | ||
| 353 | If FACE has been set with `custom-set-faces', set the face attributes | 353 | If FACE has been set with `custom-set-faces', set the face |
| 354 | as specified by that function, otherwise set the face attributes | 354 | attributes as specified by that function, otherwise set the face |
| 355 | according to SPEC. | 355 | attributes according to SPEC. |
| 356 | |||
| 357 | The remaining arguments should have the form | ||
| 358 | |||
| 359 | [KEYWORD VALUE]... | ||
| 360 | 356 | ||
| 357 | The remaining arguments should have the form [KEYWORD VALUE]... | ||
| 361 | For a list of valid keywords, see the common keywords listed in | 358 | For a list of valid keywords, see the common keywords listed in |
| 362 | `defcustom'. | 359 | `defcustom'. |
| 363 | 360 | ||
| 364 | SPEC should be an alist of the form ((DISPLAY ATTS)...). | 361 | SPEC should be an alist of the form |
| 365 | 362 | ||
| 366 | In the first element, DISPLAY can be `default'. The ATTS in that | 363 | ((DISPLAY . ATTS)...) |
| 367 | element then act as defaults for all the following elements. | 364 | |
| 368 | 365 | where DISPLAY is a form specifying conditions to match certain | |
| 369 | Aside from that, DISPLAY specifies conditions to match some or | 366 | terminals and ATTS is a property list (ATTR VALUE ATTR VALUE...) |
| 370 | all frames. For each frame, the first element of SPEC where the | 367 | specifying face attributes and values for frames on those |
| 371 | DISPLAY conditions are satisfied is the one that applies to that | 368 | terminals. On each terminal, the first element with a matching |
| 372 | frame. The ATTRs in this element take effect, and the following | 369 | DISPLAY specification takes effect, and the remaining elements in |
| 373 | elements are ignored, on that frame. | 370 | SPEC are disregarded. |
| 374 | 371 | ||
| 375 | In the last element, DISPLAY can be t. That element applies to a | 372 | As a special exception, in the first element of SPEC, DISPLAY can |
| 376 | frame if none of the previous elements (except the `default' if | 373 | be the special value `default'. Then the ATTS in that element |
| 377 | any) did. | 374 | act as defaults for all the following elements. |
| 378 | 375 | ||
| 379 | ATTS is a list of face attributes followed by their values: | 376 | For backward compatibility, elements of SPEC can be written |
| 380 | (ATTR VALUE ATTR VALUE...) | 377 | as (DISPLAY ATTS) instead of (DISPLAY . ATTS). |
| 381 | 378 | ||
| 382 | The possible attributes are `:family', `:width', `:height', `:weight', | 379 | Each DISPLAY can have the following values: |
| 383 | `:slant', `:underline', `:overline', `:strike-through', `:box', | 380 | - `default' (only in the first element). |
| 384 | `:foreground', `:background', `:stipple', `:inverse-video', and `:inherit'. | 381 | - The symbol t, which matches all terminals. |
| 385 | 382 | - An alist of conditions. Each alist element must have the form | |
| 386 | DISPLAY can be `default' (only in the first element), the symbol | 383 | (REQ ITEM...). A matching terminal must satisfy each |
| 387 | t (only in the last element) to match all frames, or an alist of | 384 | specified condition by matching one of its ITEMs. Each REQ |
| 388 | conditions of the form \(REQ ITEM...). For such an alist to | 385 | must be one of the following: |
| 389 | match a frame, each of the conditions must be satisfied, meaning | 386 | - `type' (the terminal type). |
| 390 | that the REQ property of the frame must match one of the | 387 | Each ITEM must be one of the values returned by |
| 391 | corresponding ITEMs. These are the defined REQ values: | 388 | `window-system'. Under X, additional allowed values are |
| 392 | 389 | `motif', `lucid', `gtk' and `x-toolkit'. | |
| 393 | `type' (the value of `window-system') | 390 | - `class' (the terminal's color support). |
| 394 | Under X, in addition to the values `window-system' can take, | 391 | Each ITEM should be one of `color', `grayscale', or `mono'. |
| 395 | `motif', `lucid', `gtk' and `x-toolkit' are allowed, and match when | 392 | - `background' (what color is used for the background text) |
| 396 | the Motif toolkit, Lucid toolkit, GTK toolkit or any X toolkit is in use. | 393 | Each ITEM should be one of `light' or `dark'. |
| 397 | 394 | - `min-colors' (the minimum number of supported colors) | |
| 398 | `class' (the frame's color support) | 395 | Each ITEM should be an integer, which is compared with the |
| 399 | Should be one of `color', `grayscale', or `mono'. | 396 | result of `display-color-cells'. |
| 400 | 397 | - `supports' (match terminals supporting certain attributes). | |
| 401 | `background' (what color is used for the background text) | 398 | Each ITEM should be a list of face attributes. See |
| 402 | Should be one of `light' or `dark'. | 399 | `display-supports-face-attributes-p' for more information on |
| 403 | 400 | exactly how testing is done. | |
| 404 | `min-colors' (the minimum number of colors the frame should support) | 401 | |
| 405 | Should be an integer, it is compared with the result of | 402 | In the ATTS property list, possible attributes are `:family', |
| 406 | `display-color-cells'. | 403 | `:width', `:height', `:weight', `:slant', `:underline', |
| 407 | 404 | `:overline', `:strike-through', `:box', `:foreground', | |
| 408 | `supports' (only match frames that support the specified face attributes) | 405 | `:background', `:stipple', `:inverse-video', and `:inherit'. |
| 409 | Should be a list of face attributes. See the documentation for | 406 | |
| 410 | the function `display-supports-face-attributes-p' for more | 407 | See Info node `(elisp) Faces' in the Emacs Lisp manual for more |
| 411 | information on exactly how testing is done. | 408 | information." |
| 412 | |||
| 413 | See Info node `(elisp) Customization' in the Emacs Lisp manual | ||
| 414 | for more information." | ||
| 415 | (declare (doc-string 3)) | 409 | (declare (doc-string 3)) |
| 416 | ;; It is better not to use backquote in this file, | 410 | ;; It is better not to use backquote in this file, |
| 417 | ;; because that makes a bootstrapping problem | 411 | ;; because that makes a bootstrapping problem |