[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why is custom--inhibit-theme-enable not t by default?
From: |
Stefan Monnier |
Subject: |
Re: Why is custom--inhibit-theme-enable not t by default? |
Date: |
Wed, 13 Jun 2018 23:26:53 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> > > Doesn't the command disable-theme undo the application of a custom
> > > theme?
>
> > No. Summary: There is no function that takes a snapshot
> > of the Emacs state (even, e.g., as a custom theme) before
> > applying any custom theme - which snapshot can then be used
> > to restore that pre-theme state.
>
> Perhaps we should redesign the way themes work
> so that a theme is represented by data that says what it does,
> and we could turn it on and off.
I don't think we need to redesign them, really: we simply need to say
that loading the file won't enable the theme any more. Also loading
such a file should not have any "visible" side effect (same rule as for
Elisp packages).
If a theme needs to run arbitrary code, it simply needs to define its
own global minor mode `my-foo-mode` and then within its custom settings,
it needs to set `my-foo-mode` to t.
Themes which follow these rules should work just fine in current
Emacsen, so we can simply introduce this new rule, just like we did
(a long time ago) when we decided that loading an Elisp file
should be harmless.
AFAICT the themes bundled with Emacs already obey the rule.
Stefan
- Re: Why is custom--inhibit-theme-enable not t by default?, (continued)
- Re: Why is custom--inhibit-theme-enable not t by default?, dancol, 2018/06/12
- Re: Why is custom--inhibit-theme-enable not t by default?, Eli Zaretskii, 2018/06/12
- RE: Why is custom--inhibit-theme-enable not t by default?, Drew Adams, 2018/06/12
- Re: Why is custom--inhibit-theme-enable not t by default?, Basil L. Contovounesios, 2018/06/13
- RE: Why is custom--inhibit-theme-enable not t by default?, Drew Adams, 2018/06/13
- Disabling custom themes (was: Why is custom--inhibit-theme-enable not t by default?), Basil L. Contovounesios, 2018/06/13
- RE: Disabling custom themes (was: Why is custom--inhibit-theme-enable not t by default?), Drew Adams, 2018/06/13
- Re: Disabling custom themes, Eric Abrahamsen, 2018/06/13
- Re: Disabling custom themes, Daniel Colascione, 2018/06/13
- Re: Why is custom--inhibit-theme-enable not t by default?, Richard Stallman, 2018/06/13
- Re: Why is custom--inhibit-theme-enable not t by default?,
Stefan Monnier <=
- RE: Why is custom--inhibit-theme-enable not t by default?, Drew Adams, 2018/06/14
- Re: Why is custom--inhibit-theme-enable not t by default?, Stefan Monnier, 2018/06/14
- RE: Why is custom--inhibit-theme-enable not t by default?, Drew Adams, 2018/06/14
- Re: Why is custom--inhibit-theme-enable not t by default?, Stefan Monnier, 2018/06/14
- Re: Why is custom--inhibit-theme-enable not t by default?, Basil L. Contovounesios, 2018/06/14
- Re: Why is custom--inhibit-theme-enable not t by default?, Stefan Monnier, 2018/06/14
- Re: Why is custom--inhibit-theme-enable not t by default?, Basil L. Contovounesios, 2018/06/13
- Re: Why is custom--inhibit-theme-enable not t by default?, Andy Moreton, 2018/06/17
- Re: Why is custom--inhibit-theme-enable not t by default?, Andy Moreton, 2018/06/18
- Re: Why is custom--inhibit-theme-enable not t by default?, Daniel Colascione, 2018/06/19