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

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

bug#16266: 24.3; `load-theme' prevents immediate setting of themed varia


From: Lars Ingebrigtsen
Subject: bug#16266: 24.3; `load-theme' prevents immediate setting of themed variables
Date: Sun, 30 May 2021 07:20:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Alex Kost <alezost@gmail.com> writes:

> 2. M-x load-theme RET test-bug RET
>
> After that `test-var1' and `test-var2' are still void (because
> `custom--inhibit-theme-enable' is set to T in `load-theme').
>
> 3. Evaluate these 2 expressions:
>
>     (defcustom test-var1 "red" "some doc")
>     (defvar test-var2 "red")
>
> `test-var1' is "blue" now and `test-var2' is "red".  That's why NOW is
> so necessary: a theme can set an undefined variable which will be
> defined with `defvar' only using NOW arg.

(I'm going through old bug reports that unfortunately got no response at
the time.)

I'm not sure I understand this test case.  The problem is that the
variables defined by the are "overwritten" when you load something that
is a defvar.  This does seem somewhat surprising, yes, but I think
that's how it's supposed to work?

The problem here is that test-var2 is a defvar instead of a defcustom -- if
that's the case, then themes don't work reliably, as you've found out.

So I think this is basically working as intended.  Does anybody have an
opinion here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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