emacs-devel
[Top][All Lists]
Advanced

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

Re: Why is custom--inhibit-theme-enable not t by default?


From: Eli Zaretskii
Subject: Re: Why is custom--inhibit-theme-enable not t by default?
Date: Tue, 12 Jun 2018 19:37:16 +0300

> Date: Tue, 12 Jun 2018 08:42:40 -0700
> From: address@hidden
> Cc: address@hidden,
>  address@hidden
> 
> > I think themes are special in this regard: loading a theme activates
> > it.
> 
> Why did we do it that way?

History, I guess.  AFAIR, it always has been that way.  Maybe we did
it for compatibility with themes that were available outside of Emacs
before Emacs supported themes?  Or maybe because themes are just giant
series of variable settings?  I really don't know.  We have this
commentary in custom.el:

  ;; Each theme is stored in a theme file, with filename THEME-theme.el.
  ;; Loading a theme basically involves calling (load "THEME-theme")
  ;; This is done by the function `load-theme'.  Loading a theme
  ;; automatically enables it.

You will see that load-theme reads the file, then evaluates the
buffer, so 'load' will do the same.

> Is it too late to change it? Loading _anything_ shouldn't activate
> it. I don't see a need to carve out a special case for themes.

I honestly don't know.  I don't use themes, except for testing bugs
people report in them.  Maybe ask on reddit?

> At the very least, we should make custom--inhibit-theme-enable a public
> variable so people can let-binding something that lets them load theme
> code normally without the expectation of serious side effects.

I'm okay with that, provided that we keep an alias with the old name.



reply via email to

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