GNU bug report logs -
#29443
Document how to set themes depending on a condition
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In (info "(emacs) Custom Themes") after
Setting or saving Custom themes actually works by customizing the
variable ‘custom-enabled-themes’. The value of this variable is a list
of Custom theme names (as Lisp symbols, e.g., ‘tango’). Instead of
using the ‘*Custom Themes*’ buffer to set ‘custom-enabled-themes’, you
can customize the variable using the usual customization interface,
e.g., with ‘M-x customize-option’.
please add:
Here's how to set a theme depending on a condition:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
(if(/= 0(user-uid)) '(custom-enabled-themes (quote (wheatgrass)))))
In the above we have added a condition to what Custom has put into the
customization file we found on our disk.
We set the wheatgrass theme if we are not root.
One could go further and set different themes for different seasons. The
sky's the limit!
This bug report was last modified 5 years and 284 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.