Show
Ignore:
Timestamp:
08/18/06 08:35:31 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lispref/customize.texi

    r4140 r4148  
    252252  Use @code{defcustom} to declare user-editable variables. 
    253253 
    254 @defmac defcustom option default doc [keyword value]@dots{} 
    255 Declare @var{option} as a customizable user option variable.  Do not 
    256 quote @var{option}.  The argument @var{doc} specifies the documentation 
    257 string for the variable.  There is no need to start it with a @samp{*} 
    258 because @code{defcustom} automatically marks @var{option} as a 
    259 @dfn{user option} (@pxref{Defining Variables}). 
    260  
    261 If @var{option} is void, @code{defcustom} initializes it to 
    262 @var{default}.  @var{default} should be an expression to compute the 
    263 value; be careful in writing it, because it can be evaluated on more 
    264 than one occasion.  You should normally avoid using backquotes in 
    265 @var{default} because they are not expanded when editing the value, 
    266 causing list values to appear to have the wrong structure. 
     254@defmac defcustom option standard doc [keyword value]@dots{} 
     255This construct declares @var{option} as a customizable user option 
     256variable.  You should not quote @var{option}.  The argument @var{doc} 
     257specifies the documentation string for the variable.  There is no need 
     258to start it with a @samp{*}, because @code{defcustom} automatically 
     259marks @var{option} as a @dfn{user option} (@pxref{Defining 
     260Variables}). 
     261 
     262The argument @var{standard} is an expression that specifies the 
     263standard value for @var{option}.  Evaluating the @code{defcustom} form 
     264evaluates @var{standard}, but does not necessarily install the 
     265standard value.  If @var{option} already has a default value, 
     266@code{defcustom} does not change it.  If the user has saved a 
     267customization for @var{option}, @code{defcustom} installs the user's 
     268customized value as @var{option}'s default value.  If neither of those 
     269cases applies, @code{defcustom} installs the result of evaluating 
     270@var{standard} as the default value. 
     271 
     272The expression @var{standard} can be evaluated at various other times, 
     273too---whenever the customization facility needs to know @var{option}'s 
     274standard value.  So be sure to use an expression which is harmless to 
     275evaluate at any time.  We recommend avoiding backquotes in 
     276@var{standard}, because they are not expanded when editing the value, 
     277so list values will appear to have the wrong structure. 
    267278 
    268279If you specify the @code{:set} option, to make the variable take other 
     
    407418 
    408419Internally, @code{defcustom} uses the symbol property 
    409 @code{standard-value} to record the expression for the default value, 
     420@code{standard-value} to record the expression for the standard value, 
    410421and @code{saved-value} to record the value saved by the user with the 
    411422customization buffer.  Both properties are actually lists whose car is