[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs color scheme
From: |
Thien-Thi Nguyen |
Subject: |
Re: emacs color scheme |
Date: |
03 Nov 2003 16:05:24 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
another way is to write/munge elisp to set colors as you prefer. see below
for one example. there are other similar bits of code on the Net.
thi
__________________________________________________________
;;; ID: set-theme.el,v 1.12 2003/09/08 00:08:04 ttn Rel
;;;
;;; Copyright (C) 2000,2002-2003 Thien-Thi Nguyen
;;; This file is part of ttn's personal elisp library, released under GNU
;;; GPL with ABSOLUTELY NO WARRANTY. See the file COPYING for details.
;;;
;;; Description: Select an appearance configuration.
(defvar themes '(;;name bg fg m-fg
(classic-ttn \#a85 black white)
(new-earthy black sienna gray30)
(zzzzzzzzzz black darkgreen black)
(caffeine black yellow white)
(polar white black white)
(dream black cyan blue))
"Alist w/ elements of form:
\(NAME BACKGROUND FOREGROUND MODELINE-FOREGROUND\)")
;;;###autoload
(defun set-theme (name)
(interactive (list (completing-read "Theme: "
(mapcar #'list
(mapcar #'symbol-name
(mapcar #'car
themes)))
nil ;;; predicate
t))) ;;; require-match
(when (symbolp name)
(setq name (symbol-name name)))
(if (string= "" name)
(message "(%d themes, none chosen)"
(and
(describe-variable 'themes)
(length themes)))
(apply (lambda (fg bg m-fg)
(set-background-color fg)
(set-foreground-color bg)
(set-face-foreground 'modeline m-fg))
(mapcar #'symbol-name
(cdr (assq (intern name) themes))))))
(provide 'set-theme)
;;; set-theme.el,v1.12 ends here