emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100608: * customize.texi (Composi


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100608: * customize.texi (Composite Types): Move alist/plist from Simple Types (Bug#7545).
Date: Sat, 02 Jul 2011 20:45:24 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 100608
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Sat 2011-07-02 20:45:24 -0400
message:
  * customize.texi (Composite Types): Move alist/plist from Simple Types 
(Bug#7545).
  
  * elisp.texi (Top): Update menu description.
modified:
  doc/lispref/ChangeLog
  doc/lispref/customize.texi
  doc/lispref/elisp.texi
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2011-07-03 00:24:00 +0000
+++ b/doc/lispref/ChangeLog     2011-07-03 00:45:24 +0000
@@ -1,5 +1,10 @@
 2011-07-03  Chong Yidong  <address@hidden>
 
+       * customize.texi (Composite Types): Move alist and plist to here
+       from Simple Types (Bug#7545).
+
+       * elisp.texi (Top): Update menu description.
+
        * display.texi (Face Attributes): Document negative line widths
        (Bug#6113).
 

=== modified file 'doc/lispref/customize.texi'
--- a/doc/lispref/customize.texi        2011-01-02 23:50:46 +0000
+++ b/doc/lispref/customize.texi        2011-07-03 00:45:24 +0000
@@ -513,8 +513,7 @@
 Introduction, widget, The Emacs Widget Library}, for details.
 
 @menu
-* Simple Types::            Simple customization types: sexp, integer, number,
-                              string, file, directory, alist.
+* Simple Types::            Simple customization types: sexp, integer, etc.
 * Composite Types::         Build new types from other types or data.
 * Splicing into Lists::     Splice elements into list with @code{:inline}.
 * Type Keywords::           Keyword-argument pairs in a customization type.
@@ -577,22 +576,103 @@
 @code{defcustom} to specify a list of functions recommended for use in
 the hook; see @ref{Variable Definitions}.
 
address@hidden alist
address@hidden symbol
+The value must be a symbol.  It appears in the customization buffer as
+the name of the symbol.
+
address@hidden function
+The value must be either a lambda expression or a function name.  When
+it is a function name, you can do completion with @address@hidden
+
address@hidden variable
+The value must be a variable name, and you can do completion with
address@hidden@key{TAB}}.
+
address@hidden face
+The value must be a symbol which is a face name, and you can do
+completion with @address@hidden
+
address@hidden boolean
+The value is boolean---either @code{nil} or @code{t}.  Note that by
+using @code{choice} and @code{const} together (see the next section),
+you can specify that the value must be @code{nil} or @code{t}, but also
+specify the text to describe each value in a way that fits the specific
+meaning of the alternative.
+
address@hidden coding-system
+The value must be a coding-system name, and you can do completion with
address@hidden@key{TAB}}.
+
address@hidden color
+The value must be a valid color name, and you can do completion with
address@hidden@key{TAB}}.  A sample is provided.
address@hidden table
+
address@hidden Composite Types
address@hidden Composite Types
address@hidden composite types (customization)
+
+  When none of the simple types is appropriate, you can use composite
+types, which build new types from other types or from specified data.
+The specified types or data are called the @dfn{arguments} of the
+composite type.  The composite type normally looks like this:
+
address@hidden
+(@var{constructor} @address@hidden)
address@hidden example
+
address@hidden
+but you can also add keyword-value pairs before the arguments, like
+this:
+
address@hidden
+(@var{constructor} @address@hidden@var{keyword} @address@hidden@address@hidden 
@address@hidden)
address@hidden example
+
+  Here is a table of constructors and how to use them to write
+composite types:
+
address@hidden @code
address@hidden (cons @var{car-type} @var{cdr-type})
+The value must be a cons cell, its @sc{car} must fit @var{car-type}, and
+its @sc{cdr} must fit @var{cdr-type}.  For example, @code{(cons string
+symbol)} is a customization type which matches values such as
address@hidden("foo" . foo)}.
+
+In the customization buffer, the @sc{car} and the @sc{cdr} are
+displayed and edited separately, each according to the type
+that you specify for it.
+
address@hidden (list @address@hidden)
+The value must be a list with exactly as many elements as the
address@hidden given; and each element must fit the
+corresponding @var{element-type}.
+
+For example, @code{(list integer string function)} describes a list of
+three elements; the first element must be an integer, the second a
+string, and the third a function.
+
+In the customization buffer, each element is displayed and edited
+separately, according to the type specified for it.
+
address@hidden (group @address@hidden)
+This works like @code{list} except for the formatting
+of text in the Custom buffer.  @code{list} labels each
+element value with its tag; @code{group} does not.
+
address@hidden (vector @address@hidden)
+Like @code{list} except that the value must be a vector instead of a
+list.  The elements work the same as in @code{list}.
+
address@hidden (alist :key-type @var{key-type} :value-type @var{value-type})
 The value must be a list of cons-cells, the @sc{car} of each cell
-representing a key, and the @sc{cdr} of the same cell representing an
-associated value.  The user can add and delete key/value pairs, and
+representing a key of customization type @var{key-type}, and the
address@hidden of the same cell representing a value of customization type
address@hidden  The user can add and delete key/value pairs, and
 edit both the key and the value of each pair.
 
-You can specify the key and value types like this:
-
address@hidden
-(alist :key-type @var{key-type} :value-type @var{value-type})
address@hidden smallexample
-
address@hidden
-where @var{key-type} and @var{value-type} are customization type
-specifications.  The default key type is @code{sexp}, and the default
-value type is @code{sexp}.
+If omitted, @var{key-type} and @var{value-type} default to
address@hidden
 
 The user can add any key matching the specified key type, but you can
 give some keys a preferential treatment by specifying them with the
@@ -687,105 +767,11 @@
   :type '(alist :value-type (repeat string)))
 @end smallexample
 
address@hidden plist
-The @code{plist} custom type is similar to the @code{alist} (see above),
-except that the information is stored as a property list, i.e. a list of
-this form:
-
address@hidden
-(@var{key} @var{value} @var{key} @var{value} @var{key} @var{value} @dots{})
address@hidden smallexample
-
-The default @code{:key-type} for @code{plist} is @code{symbol},
-rather than @code{sexp}.
-
address@hidden symbol
-The value must be a symbol.  It appears in the customization buffer as
-the name of the symbol.
-
address@hidden function
-The value must be either a lambda expression or a function name.  When
-it is a function name, you can do completion with @address@hidden
-
address@hidden variable
-The value must be a variable name, and you can do completion with
address@hidden@key{TAB}}.
-
address@hidden face
-The value must be a symbol which is a face name, and you can do
-completion with @address@hidden
-
address@hidden boolean
-The value is boolean---either @code{nil} or @code{t}.  Note that by
-using @code{choice} and @code{const} together (see the next section),
-you can specify that the value must be @code{nil} or @code{t}, but also
-specify the text to describe each value in a way that fits the specific
-meaning of the alternative.
-
address@hidden coding-system
-The value must be a coding-system name, and you can do completion with
address@hidden@key{TAB}}.
-
address@hidden color
-The value must be a valid color name, and you can do completion with
address@hidden@key{TAB}}.  A sample is provided.
address@hidden table
-
address@hidden Composite Types
address@hidden Composite Types
address@hidden composite types (customization)
-
-  When none of the simple types is appropriate, you can use composite
-types, which build new types from other types or from specified data.
-The specified types or data are called the @dfn{arguments} of the
-composite type.  The composite type normally looks like this:
-
address@hidden
-(@var{constructor} @address@hidden)
address@hidden example
-
address@hidden
-but you can also add keyword-value pairs before the arguments, like
-this:
-
address@hidden
-(@var{constructor} @address@hidden@var{keyword} @address@hidden@address@hidden 
@address@hidden)
address@hidden example
-
-  Here is a table of constructors and how to use them to write
-composite types:
-
address@hidden @code
address@hidden (cons @var{car-type} @var{cdr-type})
-The value must be a cons cell, its @sc{car} must fit @var{car-type}, and
-its @sc{cdr} must fit @var{cdr-type}.  For example, @code{(cons string
-symbol)} is a customization type which matches values such as
address@hidden("foo" . foo)}.
-
-In the customization buffer, the @sc{car} and the @sc{cdr} are
-displayed and edited separately, each according to the type
-that you specify for it.
-
address@hidden (list @address@hidden)
-The value must be a list with exactly as many elements as the
address@hidden given; and each element must fit the
-corresponding @var{element-type}.
-
-For example, @code{(list integer string function)} describes a list of
-three elements; the first element must be an integer, the second a
-string, and the third a function.
-
-In the customization buffer, each element is displayed and edited
-separately, according to the type specified for it.
-
address@hidden (group @address@hidden)
-This works like @code{list} except for the formatting
-of text in the Custom buffer.  @code{list} labels each
-element value with its tag; @code{group} does not.
-
address@hidden (vector @address@hidden)
-Like @code{list} except that the value must be a vector instead of a
-list.  The elements work the same as in @code{list}.
address@hidden (plist :key-type @var{key-type} :value-type @var{value-type})
+This customization type is similar to @code{alist} (see above), except
+that (i) the information is stored as a property list,
+(@pxref{Property Lists}), and (ii) @var{key-type}, if omitted,
+defaults to @code{symbol} rather than @code{sexp}.
 
 @item (choice @address@hidden)
 The value must fit at least one of @var{alternative-types}.

=== modified file 'doc/lispref/elisp.texi'
--- a/doc/lispref/elisp.texi    2011-05-29 17:18:46 +0000
+++ b/doc/lispref/elisp.texi    2011-07-03 00:45:24 +0000
@@ -505,8 +505,7 @@
 
 Customization Types
 
-* Simple Types::            Simple customization types: sexp, integer, number,
-                              string, file, directory, alist.
+* Simple Types::            Simple customization types: sexp, integer, etc.
 * Composite Types::         Build new types from other types or data.
 * Splicing into Lists::     Splice elements into list with @code{:inline}.
 * Type Keywords::           Keyword-argument pairs in a customization type.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]