Philip Kaludercic writes: > Jean Louis writes: > >> * Pankaj Jangid [2022-11-22 10:03]: >>> 2. Earlier I wrote a function to toggle themes. Now it is builtin. >> >> I have just tried: M-x toggle-theme and I get error: >> >> toggle-theme: Theme ‘light-blue’ does not have any known variants >> >> This may be because >> >> '(custom-enabled-themes '(light-blue)) >> >> So toggle-theme should have better working. > > You misunderstand the mechanism by which toggle-theme works. A theme > may declare a family: > > (deftheme tsdh-light > "A light Emacs theme. > Used and created by Tassilo Horn." > :background-mode 'light > :kind 'color-scheme > :family 'tsdh) > > When a theme of this family is enabled, M-x toggle-theme will either > prompt the user or toggle the theme to some other member of the family > automatically (the latter works if there are only two themes to switch > between). > This is nice, no need for modus-themes-toggle in modus-themes. -- Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5 Fediverse: akib@hostux.social Codeberg: akib emailselfdefense.fsf.org | "Nothing can be secure without encryption."