[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57639: [PATCH] Add new command 'toggle-theme'
From: |
Philip Kaludercic |
Subject: |
bug#57639: [PATCH] Add new command 'toggle-theme' |
Date: |
Mon, 19 Sep 2022 08:05:23 +0000 |
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> One last additional, I've added a property to all the themes indicating
>> that they are colour schemes. This would make it easier to toggle
>> between dark and light modes if multiple themes are enabled of which
>> only one is a colour theme:
>
> Makes sense. One thing that occurred to me now that I didn't think of
> before is:
>
>> (deftheme adwaita
>> "Face colors similar to the default theme of Gnome 3 (Adwaita).
>> The colors are chosen to match Adwaita window decorations and the
>> -default look of the Gnome 3 desktop.")
>> +default look of the Gnome 3 desktop."
>> + :background-mode 'light
>> + :kind 'color-scheme)
>
> Is this backwards compatible, and is that something we need to care
> about? I know that some (many?) themes are also distributed outside of
> Emacs, and should work under a range of Emacs versions. I don't think
> extending `deftheme' in this way would be backwards compatible, though,
> even if it makes sense from a language design point of view.
I don't think so, but if a theme were concerned about this, all they
need to do is
(put 'theme-name 'theme-properties '(:background-mode light :kind color-scheme))
As that is all the macro does. As I said, we could do this too and add
a autoload-cookie before it to solve the visibility issue, but it
doesn't look that nice... Can (deftheme)s be autoloaded?
- bug#57639: [PATCH] Add new command 'toggle-theme', (continued)
- bug#57639: [PATCH] Add new command 'toggle-theme', Philip Kaludercic, 2022/09/14
- bug#57639: [PATCH] Add new command 'toggle-theme', Lars Ingebrigtsen, 2022/09/14
- bug#57639: [PATCH] Add new command 'toggle-theme', Philip Kaludercic, 2022/09/17
- bug#57639: [PATCH] Add new command 'toggle-theme', Eli Zaretskii, 2022/09/17
- bug#57639: [PATCH] Add new command 'toggle-theme', Philip Kaludercic, 2022/09/17
- bug#57639: [PATCH] Add new command 'toggle-theme', Eli Zaretskii, 2022/09/18
- bug#57639: [PATCH] Add new command 'toggle-theme', Philip Kaludercic, 2022/09/18
- bug#57639: [PATCH] Add new command 'toggle-theme', Lars Ingebrigtsen, 2022/09/18
- bug#57639: [PATCH] Add new command 'toggle-theme', Philip Kaludercic, 2022/09/18
- bug#57639: [PATCH] Add new command 'toggle-theme', Lars Ingebrigtsen, 2022/09/19
- bug#57639: [PATCH] Add new command 'toggle-theme',
Philip Kaludercic <=
- bug#57639: [PATCH] Add new command 'toggle-theme', Lars Ingebrigtsen, 2022/09/19
- bug#57639: [PATCH] Add new command 'toggle-theme', Philip Kaludercic, 2022/09/19
- bug#57639: [PATCH] Add new command 'toggle-theme', Philip Kaludercic, 2022/09/20
- bug#57639: [PATCH] Add new command 'toggle-theme', Lars Ingebrigtsen, 2022/09/20
- bug#57639: [PATCH] Add new command 'toggle-theme', Philip Kaludercic, 2022/09/20
- bug#57639: [PATCH] Add new command 'toggle-theme', Lars Ingebrigtsen, 2022/09/21
- bug#57639: [PATCH] Add new command 'toggle-theme', Philip Kaludercic, 2022/09/21
- bug#57639: [PATCH] Add new command 'toggle-theme', Lars Ingebrigtsen, 2022/09/21
- bug#57639: [PATCH] Add new command 'toggle-theme', Philip Kaludercic, 2022/09/21
- bug#57639: [PATCH] Add new command 'toggle-theme', Lars Ingebrigtsen, 2022/09/21