help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Modifying many function calls


From: PJ Weisberg
Subject: Re: Modifying many function calls
Date: Thu, 28 Oct 2010 02:56:35 +0000

On Wed, Oct 27, 2010 at 10:16 AM, Andrea Crotti
<andrea.crotti.0@gmail.com> wrote:

> And since I'm here, why I can't redefine a variable with defcustom?
> I mean if I do
>
> (defcustom x 1)
> then I want to change it
> and I write and evaluate
> (defcustom x 2)
>
> then even if I set it to nil and the reevaluate again still it doesn't
> care.
> Is that normal?

If the user has already customized x to some value (nil or anything
else), then you don't want the default value to overwrite it.  So
defcustom avoids setting the value if it's already been set.

(Note that if x is a buffer-local variable with no global value,
defcustom will set the global default value without changing the local
value.)



reply via email to

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