[Top][All Lists]

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

Re: Change `customize-save-variable' to work under "emacs -Q"?

From: Chong Yidong
Subject: Re: Change `customize-save-variable' to work under "emacs -Q"?
Date: Mon, 11 Jul 2011 15:04:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

PJ Weisberg <address@hidden> writes:

> On Monday, July 11, 2011, Chong Yidong <address@hidden> wrote:
>> Lars Magne Ingebrigtsen <address@hidden> writes:
>>> If you run "emacs -Q", and you have a piece of code that calls
>>> `customize-save-variable', it will error out, saying that it won't
>>> overwrite the conf.
>>> Would anybody mind if I changed that function to not error out, but
>>> instead just do a `setq' on the variable in question, if we're running
>>> under -Q?
>> I think this is fine.
> If the user asks to save a variable for future sessions, but you can
> only set it for the current session, *shouldn't* that be an error?

Lars had a good point: if we commonly encounter the case where we want
to do a "save if possible, otherwise setq" operation, it makes sense to
make that easy to do.

But, on reflection, maybe

  (ignore-errors (customize-save-variable ...))

would work just as well.

reply via email to

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