GNU bug report logs - #29443
Document how to set themes depending on a condition

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sat, 25 Nov 2017 18:36:02 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: 29443 <at> debbugs.gnu.org
Subject: bug#29443: Document how to set themes depending on a condition
Date: Sun, 26 Nov 2017 01:40:16 +0800
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.