[Top][All Lists]

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

Re: `xterm-mouse-mode' has a bogus Custom group

From: Luc Teirlinck
Subject: Re: `xterm-mouse-mode' has a bogus Custom group
Date: Sun, 10 Apr 2005 18:30:01 -0500 (CDT)

Nick Roberts wrote:

   I don't know how to access the standard value (:init-value?), what
   would happen if its not set, etc, but if its a sensible idea, I
   could look at it.

The standard value is the _unevaluated_ expression given as value in
the defcustom.  In the case of define-minor-mode, that is the
expression given as :init-value.  Evaluating the defcustom produced by
define-minor-mode sets or resets it to that.

You access the standard value from Lisp as
(car (get symbol 'standard-value))

If you did not customize the option you also get it from selecting
"Show initial Lisp expression" in the Custom buffer.

"Erase Customization" in a Custom buffer sets the value for the
current session back to Custom's idea of the standard value.  So if
that is different from the real default, trouble may result for the
current session.

You can change Custom's idea of the standard value by changing the
'standard-value property of the option symbol to a list whose car is
the expression you want.  But if then for any reason whatsoever the
defcustom gets evaluated again, it will set the standard value back to
the expression given in the defcustom.



reply via email to

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