aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-02-05 22:27:06 +0800
committerChong Yidong2012-02-05 22:27:06 +0800
commite1161b06fc12499f9990fc23a915d75bb8866cd2 (patch)
tree7083194e08637abe0d4fd6ed14f15470ad66d514
parenteeb6cc88a999104c4ada43ce4dee2c40875a2016 (diff)
downloademacs-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-RELEASE2
-rw-r--r--doc/lispref/ChangeLog3
-rw-r--r--doc/lispref/customize.texi108
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
188commands.texi 188commands.texi
189compile.texi 189compile.texi
190control.texi cyd 190control.texi cyd
191customize.texi 191customize.texi cyd
192debugging.texi 192debugging.texi
193display.texi 193display.texi
194edebug.texi 194edebug.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
523several of these customization types, the customization widget
524provides 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
526The value may be any Lisp object that can be printed and read back. You 528The value may be any Lisp object that can be printed and read back.
527can use @code{sexp} as a fall-back for any option, if you don't want to 529You can use @code{sexp} as a fall-back for any option, if you don't
528take the time to work out a more specific type to use. 530want to take the time to work out a more specific type to use.
529 531
530@item integer 532@item integer
531The value must be an integer, and is represented textually 533The value must be an integer.
532in the customization buffer.
533 534
534@item number 535@item number
535The value must be a number (floating point or integer), and is 536The value must be a number (floating point or integer).
536represented textually in the customization buffer.
537 537
538@item float 538@item float
539The value must be a floating point number, and is represented 539The value must be a floating point number.
540textually in the customization buffer.
541 540
542@item string 541@item string
543The value must be a string, and the customization buffer shows just the 542The value must be a string. The customization buffer shows the string
544contents, with no delimiting @samp{"} characters and no quoting with 543without delimiting @samp{"} characters or @samp{\} quotes.
545@samp{\}.
546 544
547@item regexp 545@item regexp
548Like @code{string} except that the string must be a valid regular 546Like @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
554buffer, rather than by showing the number. 552buffer, rather than by showing the number.
555 553
556@item file 554@item file
557The value must be a file name, and you can do completion with 555The 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)
561The value must be a file name for an existing file, and you can do 558The value must be a file name for an existing file. The widget
562completion with @kbd{M-@key{TAB}}. 559provides completion.
563 560
564@item directory 561@item directory
565The value must be a directory name, and you can do completion with 562The value must be a directory name. The widget provides completion.
566@kbd{M-@key{TAB}}.
567 563
568@item hook 564@item hook
569The value must be a list of functions (or a single function, but that is 565The value must be a list of functions. This customization type is
570obsolete usage). This customization type is used for hook variables. 566used for hook variables. You can use the @code{:options} keyword in a
571You can use the @code{:options} keyword in a hook variable's 567hook variable's @code{defcustom} to specify a list of functions
572@code{defcustom} to specify a list of functions recommended for use in 568recommended for use in the hook; @xref{Variable Definitions}.
573the hook; see @ref{Variable Definitions}.
574 569
575@item symbol 570@item symbol
576The value must be a symbol. It appears in the customization buffer as 571The value must be a symbol. It appears in the customization buffer as
577the name of the symbol. 572the symbol name. The widget provides completion.
578 573
579@item function 574@item function
580The value must be either a lambda expression or a function name. When 575The value must be either a lambda expression or a function name. The
581it is a function name, you can do completion with @kbd{M-@key{TAB}}. 576widget provides completion for function names.
582 577
583@item variable 578@item variable
584The value must be a variable name, and you can do completion with 579The value must be a variable name. The widget provides completion.
585@kbd{M-@key{TAB}}.
586 580
587@item face 581@item face
588The value must be a symbol which is a face name, and you can do 582The value must be a symbol which is a face name. The widget provides
589completion with @kbd{M-@key{TAB}}. 583completion.
590 584
591@item boolean 585@item boolean
592The value is boolean---either @code{nil} or @code{t}. Note that by 586The 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
603The value must be a valid color name, and you can do completion with 597The value must be a valid color name. The widget provides completion
604@kbd{M-@key{TAB}}. A sample is provided. 598for color names, as well as a sample and a button for selecting a
599color name from a list of color names shown in a @samp{*Colors*}
600buffer.
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
635symbol)} is a customization type which matches values such as 631symbol)} is a customization type which matches values such as
636@code{("foo" . foo)}. 632@code{("foo" . foo)}.
637 633
638In the customization buffer, the @sc{car} and the @sc{cdr} are 634In the customization buffer, the @sc{car} and @sc{cdr} are displayed
639displayed and edited separately, each according to the type 635and edited separately, each according to their specified type.
640that you specify for it.
641 636
642@item (list @var{element-types}@dots{}) 637@item (list @var{element-types}@dots{})
643The value must be a list with exactly as many elements as the 638The 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
681The argument to the @code{:options} keywords should be a list of 676The argument to the @code{:options} keywords should be a list of
682specifications for reasonable keys in the alist. Ordinarily, they are 677specifications for reasonable keys in the alist. Ordinarily, they are
683simply atoms, which stand for themselves as. For example: 678simply 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.
754Each element has the form (NAME AGE MALE-FLAG)." 749Each 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.
761In an element (KEY . VALUE), KEY is the person's name,
762and 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,
770defaults to @code{symbol} rather than @code{sexp}. 757defaults to @code{symbol} rather than @code{sexp}.
771 758
772@item (choice @var{alternative-types}@dots{}) 759@item (choice @var{alternative-types}@dots{})
773The value must fit at least one of @var{alternative-types}. 760The value must fit one of @var{alternative-types}. For example,
774For example, @code{(choice integer string)} allows either an 761@code{(choice integer string)} allows either an integer or a string.
775integer or a string.
776 762
777In the customization buffer, the user selects an alternative 763In the customization buffer, the user selects an alternative
778using a menu, and can then edit the value in the usual way for that 764using 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
967elements into the middle of a list or vector. You use it in a 953elements into the middle of a @code{list} or @code{vector}
968@code{set}, @code{choice} or @code{repeat} type which appears among the 954customization type. You use it by adding @code{:inline t} to a type
969element-types of a @code{list} or @code{vector}. 955specification which is contained in a @code{list} or @code{vector}
970 956specification.
971 Normally, each of the element-types in a @code{list} or @code{vector} 957
972describes 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
973element-type is a @code{repeat}, that specifies a list of unspecified 959specification describes a single element type. But when an entry
974length which appears as one element. 960contains @code{:inline t}, the value it matches is merged directly
975 961into the containing sequence. For example, if the entry matches a
976 But when the element-type uses @code{:inline}, the value it matches is 962list with three elements, those become three elements of the overall
977merged directly into the containing sequence. For example, if it 963sequence. This is analogous to @samp{,@@} in a backquote construct
978matches a list with three elements, those become three elements of the 964(@pxref{Backquote}).
979overall sequence. This is analogous to using @samp{,@@} in the backquote
980construct.
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}
983and whose remaining arguments should be zero or more of @code{foo} and 967and whose remaining arguments should be zero or more of @code{foo} and