[Top][All Lists]

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

Re: toggling a minor mode should not tell Customize that the value has b

From: Stefan Monnier
Subject: Re: toggling a minor mode should not tell Customize that the value has been set
Date: Sun, 06 Jan 2008 20:32:53 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

>> In contrast, when the user interactively does M-x foo-mode RET, we know
>> that this has been done in a way that Customize can easily understand
>> and which does not affect its ability o make further changes and/or save
>> the variable.  Calling it customize-mark-as-set is a way to better
>> interact with Customize.

> You could say the same thing for any assignment to any user option outside
> of Customize, interactive or not.

No, you couldn't.  The fact that you can't is at the very core of the
existence of the status "set outside Customize".  That's also why the
call to customize-mark-as-set is only done if the minor mode function is
called interactively.

Your failure to understand the above is probably at the origin of your
desire to change the behavior.

Depending on how the assignment takes place, Customize can't do anything
with it: modifying the variable back to some other value may not
actually take effect (because the offending setq may be on
a post-command-hook, for example and hence resets the var right after
Customize changed it), saving the var may also fail to take effect next
time we start Emacs (because the offending `setq' is run later on in the
.emacs file), ...


reply via email to

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