diff options
| author | Chong Yidong | 2012-02-05 22:27:06 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-02-05 22:27:06 +0800 |
| commit | e1161b06fc12499f9990fc23a915d75bb8866cd2 (patch) | |
| tree | 7083194e08637abe0d4fd6ed14f15470ad66d514 | |
| parent | eeb6cc88a999104c4ada43ce4dee2c40875a2016 (diff) | |
| download | emacs-e1161b06fc12499f9990fc23a915d75bb8866cd2.tar.gz emacs-e1161b06fc12499f9990fc23a915d75bb8866cd2.zip | |
Update Customization chapter of Lisp manual.
* doc/lispref/customize.texi (Common Keywords): Minor clarifications.
Document custom-unlispify-remove-prefixes.
(Variable Definitions): Backquotes in defcustom seem to work fine
now. Various other copyedits.
(Simple Types): Copyedits. Document color selector.
(Composite Types): Copyedits.
(Splicing into Lists): Clarifications.
| -rw-r--r-- | admin/FOR-RELEASE | 2 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 3 | ||||
| -rw-r--r-- | doc/lispref/customize.texi | 108 |
3 files changed, 50 insertions, 63 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 74a758826a1..379363252b2 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -188,7 +188,7 @@ buffers.texi | |||
| 188 | commands.texi | 188 | commands.texi |
| 189 | compile.texi | 189 | compile.texi |
| 190 | control.texi cyd | 190 | control.texi cyd |
| 191 | customize.texi | 191 | customize.texi cyd |
| 192 | debugging.texi | 192 | debugging.texi |
| 193 | display.texi | 193 | display.texi |
| 194 | edebug.texi | 194 | edebug.texi |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index bd7b27bbe60..85dc017d7f5 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -4,6 +4,9 @@ | |||
| 4 | Document custom-unlispify-remove-prefixes. | 4 | Document custom-unlispify-remove-prefixes. |
| 5 | (Variable Definitions): Backquotes in defcustom seem to work fine | 5 | (Variable Definitions): Backquotes in defcustom seem to work fine |
| 6 | now. Various other copyedits. | 6 | now. Various other copyedits. |
| 7 | (Simple Types): Copyedits. Document color selector. | ||
| 8 | (Composite Types): Copyedits. | ||
| 9 | (Splicing into Lists): Clarifications. | ||
| 7 | 10 | ||
| 8 | * eval.texi (Backquote): Move from macros.texi. | 11 | * eval.texi (Backquote): Move from macros.texi. |
| 9 | 12 | ||
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index b8c30fff8ae..4c3adee0db5 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi | |||
| @@ -519,30 +519,28 @@ Introduction, widget, The Emacs Widget Library}, for details. | |||
| 519 | @node Simple Types | 519 | @node Simple Types |
| 520 | @subsection Simple Types | 520 | @subsection Simple Types |
| 521 | 521 | ||
| 522 | This section describes all the simple customization types. | 522 | This section describes all the simple customization types. For |
| 523 | several of these customization types, the customization widget | ||
| 524 | provides inline completion with @kbd{C-M-i} or @kbd{M-@key{TAB}}. | ||
| 523 | 525 | ||
| 524 | @table @code | 526 | @table @code |
| 525 | @item sexp | 527 | @item sexp |
| 526 | The value may be any Lisp object that can be printed and read back. You | 528 | The value may be any Lisp object that can be printed and read back. |
| 527 | can use @code{sexp} as a fall-back for any option, if you don't want to | 529 | You can use @code{sexp} as a fall-back for any option, if you don't |
| 528 | take the time to work out a more specific type to use. | 530 | want to take the time to work out a more specific type to use. |
| 529 | 531 | ||
| 530 | @item integer | 532 | @item integer |
| 531 | The value must be an integer, and is represented textually | 533 | The value must be an integer. |
| 532 | in the customization buffer. | ||
| 533 | 534 | ||
| 534 | @item number | 535 | @item number |
| 535 | The value must be a number (floating point or integer), and is | 536 | The value must be a number (floating point or integer). |
| 536 | represented textually in the customization buffer. | ||
| 537 | 537 | ||
| 538 | @item float | 538 | @item float |
| 539 | The value must be a floating point number, and is represented | 539 | The value must be a floating point number. |
| 540 | textually in the customization buffer. | ||
| 541 | 540 | ||
| 542 | @item string | 541 | @item string |
| 543 | The value must be a string, and the customization buffer shows just the | 542 | The value must be a string. The customization buffer shows the string |
| 544 | contents, with no delimiting @samp{"} characters and no quoting with | 543 | without delimiting @samp{"} characters or @samp{\} quotes. |
| 545 | @samp{\}. | ||
| 546 | 544 | ||
| 547 | @item regexp | 545 | @item regexp |
| 548 | Like @code{string} except that the string must be a valid regular | 546 | Like @code{string} except that the string must be a valid regular |
| @@ -554,39 +552,35 @@ integer, but this type shows the value by inserting the character in the | |||
| 554 | buffer, rather than by showing the number. | 552 | buffer, rather than by showing the number. |
| 555 | 553 | ||
| 556 | @item file | 554 | @item file |
| 557 | The value must be a file name, and you can do completion with | 555 | The value must be a file name. The widget provides completion. |
| 558 | @kbd{M-@key{TAB}}. | ||
| 559 | 556 | ||
| 560 | @item (file :must-match t) | 557 | @item (file :must-match t) |
| 561 | The value must be a file name for an existing file, and you can do | 558 | The value must be a file name for an existing file. The widget |
| 562 | completion with @kbd{M-@key{TAB}}. | 559 | provides completion. |
| 563 | 560 | ||
| 564 | @item directory | 561 | @item directory |
| 565 | The value must be a directory name, and you can do completion with | 562 | The value must be a directory name. The widget provides completion. |
| 566 | @kbd{M-@key{TAB}}. | ||
| 567 | 563 | ||
| 568 | @item hook | 564 | @item hook |
| 569 | The value must be a list of functions (or a single function, but that is | 565 | The value must be a list of functions. This customization type is |
| 570 | obsolete usage). This customization type is used for hook variables. | 566 | used for hook variables. You can use the @code{:options} keyword in a |
| 571 | You can use the @code{:options} keyword in a hook variable's | 567 | hook variable's @code{defcustom} to specify a list of functions |
| 572 | @code{defcustom} to specify a list of functions recommended for use in | 568 | recommended for use in the hook; @xref{Variable Definitions}. |
| 573 | the hook; see @ref{Variable Definitions}. | ||
| 574 | 569 | ||
| 575 | @item symbol | 570 | @item symbol |
| 576 | The value must be a symbol. It appears in the customization buffer as | 571 | The value must be a symbol. It appears in the customization buffer as |
| 577 | the name of the symbol. | 572 | the symbol name. The widget provides completion. |
| 578 | 573 | ||
| 579 | @item function | 574 | @item function |
| 580 | The value must be either a lambda expression or a function name. When | 575 | The value must be either a lambda expression or a function name. The |
| 581 | it is a function name, you can do completion with @kbd{M-@key{TAB}}. | 576 | widget provides completion for function names. |
| 582 | 577 | ||
| 583 | @item variable | 578 | @item variable |
| 584 | The value must be a variable name, and you can do completion with | 579 | The value must be a variable name. The widget provides completion. |
| 585 | @kbd{M-@key{TAB}}. | ||
| 586 | 580 | ||
| 587 | @item face | 581 | @item face |
| 588 | The value must be a symbol which is a face name, and you can do | 582 | The value must be a symbol which is a face name. The widget provides |
| 589 | completion with @kbd{M-@key{TAB}}. | 583 | completion. |
| 590 | 584 | ||
| 591 | @item boolean | 585 | @item boolean |
| 592 | The value is boolean---either @code{nil} or @code{t}. Note that by | 586 | The value is boolean---either @code{nil} or @code{t}. Note that by |
| @@ -600,8 +594,10 @@ The value must be a coding-system name, and you can do completion with | |||
| 600 | @kbd{M-@key{TAB}}. | 594 | @kbd{M-@key{TAB}}. |
| 601 | 595 | ||
| 602 | @item color | 596 | @item color |
| 603 | The value must be a valid color name, and you can do completion with | 597 | The value must be a valid color name. The widget provides completion |
| 604 | @kbd{M-@key{TAB}}. A sample is provided. | 598 | for color names, as well as a sample and a button for selecting a |
| 599 | color name from a list of color names shown in a @samp{*Colors*} | ||
| 600 | buffer. | ||
| 605 | @end table | 601 | @end table |
| 606 | 602 | ||
| 607 | @node Composite Types | 603 | @node Composite Types |
| @@ -635,9 +631,8 @@ its @sc{cdr} must fit @var{cdr-type}. For example, @code{(cons string | |||
| 635 | symbol)} is a customization type which matches values such as | 631 | symbol)} is a customization type which matches values such as |
| 636 | @code{("foo" . foo)}. | 632 | @code{("foo" . foo)}. |
| 637 | 633 | ||
| 638 | In the customization buffer, the @sc{car} and the @sc{cdr} are | 634 | In the customization buffer, the @sc{car} and @sc{cdr} are displayed |
| 639 | displayed and edited separately, each according to the type | 635 | and edited separately, each according to their specified type. |
| 640 | that you specify for it. | ||
| 641 | 636 | ||
| 642 | @item (list @var{element-types}@dots{}) | 637 | @item (list @var{element-types}@dots{}) |
| 643 | The value must be a list with exactly as many elements as the | 638 | The value must be a list with exactly as many elements as the |
| @@ -680,7 +675,7 @@ specified by the @code{:options} keyword argument. | |||
| 680 | 675 | ||
| 681 | The argument to the @code{:options} keywords should be a list of | 676 | The argument to the @code{:options} keywords should be a list of |
| 682 | specifications for reasonable keys in the alist. Ordinarily, they are | 677 | specifications for reasonable keys in the alist. Ordinarily, they are |
| 683 | simply atoms, which stand for themselves as. For example: | 678 | simply atoms, which stand for themselves. For example: |
| 684 | 679 | ||
| 685 | @smallexample | 680 | @smallexample |
| 686 | :options '("foo" "bar" "baz") | 681 | :options '("foo" "bar" "baz") |
| @@ -753,14 +748,6 @@ key, using variations of this trick: | |||
| 753 | "Alist of basic info about people. | 748 | "Alist of basic info about people. |
| 754 | Each element has the form (NAME AGE MALE-FLAG)." | 749 | Each element has the form (NAME AGE MALE-FLAG)." |
| 755 | :type '(alist :value-type (group integer boolean))) | 750 | :type '(alist :value-type (group integer boolean))) |
| 756 | |||
| 757 | (defcustom pets '(("brian") | ||
| 758 | ("dorith" "dog" "guppy") | ||
| 759 | ("ken" "cat")) | ||
| 760 | "Alist of people's pets. | ||
| 761 | In an element (KEY . VALUE), KEY is the person's name, | ||
| 762 | and the VALUE is a list of that person's pets." | ||
| 763 | :type '(alist :value-type (repeat string))) | ||
| 764 | @end smallexample | 751 | @end smallexample |
| 765 | 752 | ||
| 766 | @item (plist :key-type @var{key-type} :value-type @var{value-type}) | 753 | @item (plist :key-type @var{key-type} :value-type @var{value-type}) |
| @@ -770,9 +757,8 @@ that (i) the information is stored as a property list, | |||
| 770 | defaults to @code{symbol} rather than @code{sexp}. | 757 | defaults to @code{symbol} rather than @code{sexp}. |
| 771 | 758 | ||
| 772 | @item (choice @var{alternative-types}@dots{}) | 759 | @item (choice @var{alternative-types}@dots{}) |
| 773 | The value must fit at least one of @var{alternative-types}. | 760 | The value must fit one of @var{alternative-types}. For example, |
| 774 | For example, @code{(choice integer string)} allows either an | 761 | @code{(choice integer string)} allows either an integer or a string. |
| 775 | integer or a string. | ||
| 776 | 762 | ||
| 777 | In the customization buffer, the user selects an alternative | 763 | In the customization buffer, the user selects an alternative |
| 778 | using a menu, and can then edit the value in the usual way for that | 764 | using a menu, and can then edit the value in the usual way for that |
| @@ -964,20 +950,18 @@ whatever follows the last keyword-value pair. | |||
| 964 | @subsection Splicing into Lists | 950 | @subsection Splicing into Lists |
| 965 | 951 | ||
| 966 | The @code{:inline} feature lets you splice a variable number of | 952 | The @code{:inline} feature lets you splice a variable number of |
| 967 | elements into the middle of a list or vector. You use it in a | 953 | elements into the middle of a @code{list} or @code{vector} |
| 968 | @code{set}, @code{choice} or @code{repeat} type which appears among the | 954 | customization type. You use it by adding @code{:inline t} to a type |
| 969 | element-types of a @code{list} or @code{vector}. | 955 | specification which is contained in a @code{list} or @code{vector} |
| 970 | 956 | specification. | |
| 971 | Normally, each of the element-types in a @code{list} or @code{vector} | 957 | |
| 972 | describes one and only one element of the list or vector. Thus, if an | 958 | Normally, each entry in a @code{list} or @code{vector} type |
| 973 | element-type is a @code{repeat}, that specifies a list of unspecified | 959 | specification describes a single element type. But when an entry |
| 974 | length which appears as one element. | 960 | contains @code{:inline t}, the value it matches is merged directly |
| 975 | 961 | into the containing sequence. For example, if the entry matches a | |
| 976 | But when the element-type uses @code{:inline}, the value it matches is | 962 | list with three elements, those become three elements of the overall |
| 977 | merged directly into the containing sequence. For example, if it | 963 | sequence. This is analogous to @samp{,@@} in a backquote construct |
| 978 | matches a list with three elements, those become three elements of the | 964 | (@pxref{Backquote}). |
| 979 | overall sequence. This is analogous to using @samp{,@@} in the backquote | ||
| 980 | construct. | ||
| 981 | 965 | ||
| 982 | For example, to specify a list whose first element must be @code{baz} | 966 | For example, to specify a list whose first element must be @code{baz} |
| 983 | and whose remaining arguments should be zero or more of @code{foo} and | 967 | and whose remaining arguments should be zero or more of @code{foo} and |