help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Emacs Themes


From: Jamie Beardslee
Subject: Re: Emacs Themes
Date: Fri, 20 Nov 2020 16:21:51 +1300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Christopher Dimech <dimech@gmx.com> writes:
> Have two themes and would like to cycle between the two using
> a keybinding.  How can I do it?

Here's how I'd do it:

(defun toggle-light-or-dark-theme ()
  (interactive)
  (if (member 'modus-operandi custom-enabled-themes)
      (progn
        (disable-theme 'modus-operandi)
        (load-theme 'modus-vivendi t))
    (disable-theme 'modus-vivendi)
    (load-theme 'modus-operandi t)))

And then of course you can bind it to a key with `global-set-key'.

--
Jamie




reply via email to

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