unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Alex Kost <alezost@gmail.com>
Cc: 16266@debbugs.gnu.org
Subject: bug#16266: 24.3; `load-theme' prevents immediate setting of themed variables
Date: Sun, 30 May 2021 07:20:54 +0200	[thread overview]
Message-ID: <87lf7w4x1l.fsf@gnus.org> (raw)
In-Reply-To: <8761qaaevr.fsf@gmail.com> (Alex Kost's message of "Fri, 27 Dec 2013 12:15:36 +0400")

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	other threads:[~2021-05-30  5:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-27  7:15 bug#16266: 24.3; `load-theme' prevents immediate setting of themed variables Alex Kost
2013-12-27  8:15 ` Alex Kost
2021-05-30  5:20   ` Lars Ingebrigtsen [this message]
2021-07-01 11:41     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lf7w4x1l.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=16266@debbugs.gnu.org \
    --cc=alezost@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).