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

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

RE: [External] : Re: Is there a way of setting a variable only when it e


From: Drew Adams
Subject: RE: [External] : Re: Is there a way of setting a variable only when it exists?
Date: Tue, 15 Mar 2022 15:38:12 +0000

> What if it's an internal Emacs variable which might become a user
> option one day (I submitted a bug report about it) and then my
> customization silently disappears?  It's the "silently" part I
> want to guard against...

What do you mean by "an internal Emacs variable"?

If it's a defvar then Emacs's predefined defvar
has no effect if you defvar the variable before
Emacs does.  And it has no effect if you setq
the var before or after Emacs defvars it (as long
as Emacs doesn't _use_ it before you setq it).

If Emacs later changes it to a defcustom, the
same things apply.  However, if the defcustom has
a :set function then your own setting of it might
no longer be appropriate ("valid").



reply via email to

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