]> code.delx.au - gnu-emacs/blobdiff - lispref/customize.texi
*** empty log message ***
[gnu-emacs] / lispref / customize.texi
index 1170a9091183831d11719af9c8e71be336a5a04e..76b1c1a1a93f892e015435d82ce66f3374dba7a2 100644 (file)
@@ -1,7 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
 @c Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004,
-@c   2005 Free Software Foundation, Inc.
+@c   2005, 2006 Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/customize
 @node Customization, Loading, Macros, Top
@@ -76,7 +76,7 @@ in the customization buffer with the Info node name.
 Link to a web page; @var{url} is a string which specifies the
 @acronym{URL}.  The link appears in the customization buffer as
 @var{url} and invokes the WWW browser specified by
-@var{browse-url-browser-function}.
+@code{browse-url-browser-function}.
 
 @item (emacs-commentary-link @var{library})
 Link to the commentary section of a library; @var{library} is a string
@@ -130,8 +130,49 @@ any effect unless the code which implements the mode is loaded.
 This option specifies that the item was first introduced in Emacs
 version @var{version}, or that its default value was changed in that
 version.  The value @var{version} must be a string.
+
+@item :package-version '(@var{package} . @var{version})
+This option specifies that the item was first introduced in
+@var{package} version @var{version}, or that its default value was
+changed in that version.  This keyword takes priority over :version.
+The value of @var{package} is a symbol and @var{version} is a string.
+The @var{package} and @var{version} must appear in the alist
+@code{customize-package-emacs-version-alist}.  Since @var{package} must
+be unique and the user might see it in an error message, a good choice
+is the official name of the package, such as MH-E or Gnus.
+
 @end table
 
+Packages that use the @code{:package-version} keyword must also update
+the @code{customize-package-emacs-version-alist} variable.
+
+@defvar customize-package-emacs-version-alist
+This alist provides a mapping for the versions of Emacs that are
+associated with versions of a package listed in the
+@code{:package-version} keyword.  Its elements look like this:
+
+@example
+(@var{package} (@var{pversion} . @var{eversion})@dots{})
+@end example
+
+For each @var{package}, which is a symbol, there are one or more
+elements that contain a package version @var{pversion} with an
+associated Emacs version @var{eversion}.  These versions are strings.
+For example, the MH-E package updates this alist with the following:
+
+@smallexample
+(add-to-list 'customize-package-emacs-version-alist
+             '(MH-E ("6.0" . "22.1") ("6.1" . "22.1") ("7.0" . "22.1")
+                    ("7.1" . "22.1") ("7.2" . "22.1") ("7.3" . "22.1")
+                    ("7.4" . "22.1") ("8.0" . "22.1")))
+@end smallexample
+
+The value of @var{package} needs to be unique and it needs to match
+the @var{package} value appearing in the @code{:package-version}
+keyword.  Since the user might see the value in a error message, a good
+choice is the official name of the package, such as MH-E or Gnus.
+@end defvar
+
 @node Group Definitions
 @section Defining Custom Groups
 
@@ -155,8 +196,7 @@ keyword.
 @defmac defgroup group members doc [keyword value]@dots{}
 Declare @var{group} as a customization group containing @var{members}.
 Do not quote the symbol @var{group}.  The argument @var{doc} specifies
-the documentation string for the group.  It should not start with a
-@samp{*} as in @code{defcustom}; that convention is for variables only.
+the documentation string for the group.
 
 The argument @var{members} is a list specifying an initial set of
 customization items to be members of the group.  However, most often
@@ -211,12 +251,9 @@ turn this feature back on, if someone would like to do the work.
 @defmac defcustom option default doc [keyword value]@dots{}
 Declare @var{option} as a customizable user option variable.  Do not
 quote @var{option}.  The argument @var{doc} specifies the documentation
-string for the variable.  It should often start with a @samp{*} to mark
-it as a @dfn{user option} (@pxref{Defining Variables}).  Do not start
-the documentation string with @samp{*} for options which cannot or
-normally should not be set with @code{set-variable}; examples of the
-former are global minor mode options such as
-@code{global-font-lock-mode} and examples of the latter are hooks.
+string for the variable.  There is no need to start it with a @samp{*}
+because @code{defcustom} automatically marks @var{option} as a
+@dfn{user option} (@pxref{Defining Variables}).
 
 If @var{option} is void, @code{defcustom} initializes it to
 @var{default}.  @var{default} should be an expression to compute the
@@ -1015,7 +1052,6 @@ the echo area.  In addition, @var{motion-doc} is used as the mouse
 @code{help-echo} string and may actually be a function or form evaluated
 to yield a help string.  If it is a function, it is called with one
 argument, the widget.
-@xref{Text help-echo}.
 
 @item :match @var{function}
 Specify how to decide whether a value matches the type.  The