From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Gary Weselle" Newsgroups: gmane.emacs.help Subject: Re: a better face for your eyes Date: Sat, 1 Apr 2006 12:14:33 -0800 Organization: iPrimus Customer - reports relating to abuse should be sent to abuse@iprimus.com.au Message-ID: <442dd418_1@news.iprimus.com.au> References: <442d7fc0$1_1@news.iprimus.com.au> <7e7j6atlhr.fsf@ada2.unipv.it> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1143855640 24094 80.91.229.2 (1 Apr 2006 01:40:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 1 Apr 2006 01:40:40 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 01 03:40:35 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FPV6P-0000kX-3B for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Apr 2006 03:40:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FPV6O-0006fv-LS for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Mar 2006 20:40:32 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsfeed.pacific.net.au!token.pipenetworks.com!218.100.2.59.MISMATCH!not-for-mail Original-Newsgroups: gnu.emacs.help X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Original-NNTP-Posting-Host: 58.178.49.52 X-Original-NNTP-Posting-Host: 127.0.0.1 Original-Lines: 77 Original-NNTP-Posting-Host: 203.134.67.67 Original-X-Trace: 1143854107 un-2park-reader-01.sydney.pipenetworks.com.au 1231 203.134.67.67:4844 Original-X-Complaints-To: Abuse, including message IDs to abuse@pipenetworks.com Original-Xref: shelby.stanford.edu gnu.emacs.help:138493 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:34113 Archived-At: "Thien-Thi Nguyen" wrote in message news:7e7j6atlhr.fsf@ada2.unipv.it... > "Gary Weselle" writes: > > > Any body with a better solution. > > there are many "themes" packages, some quite fancy. below is a simple > one. i load this on startup, and call `set-theme' from ~/.emacs, which > is early enough to make the mysterious (to me) font-lock machinery DTRT > for things like `font-lock-function-face', etc. back when i was loading > it later in the session, sometimes font-lock would make disturbing color > choices. > > thi > > _________________________________________________ > ;;; set-theme.el > ;;; > ;;; Rel:v-1-55 > ;;; > ;;; Copyright (C) 2000,2002,2003,2004,2006 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 m-bg (optional) > (classic-ttn \#a85 black white black) > (new-earthy black sienna gray30) > (zzzzzzzzzz black darkgreen black) > (caffeine black yellow white) > (polar white black white black) > (dream black cyan white blue) > (fuori-fuso black green magenta) > (vt220 black goldenrod gray30)) > "List w/ elements of form: > \(NAME BACKGROUND FOREGROUND MODELINE-FOREGROUND [MODELINE-BACKGROUND]\) > If MODELINE-BACKGROUND is not specified, it defaults to BACKGROUND. > All elements are symbols. Use `\\#RGB' to specify a color using RGB components.") > > ;;;###autoload > (defun set-theme (name) > "Select appearance configuration NAME. (See variable `themes'.)" > (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 (bg fg m-fg &optional m-bg) > (set-face-foreground 'default fg) > (set-face-background 'default bg) > (let ((v [set-face-background set-face-foreground]) > (i (if (face-inverse-video-p 'mode-line) 0 1))) > (funcall (aref v i) 'mode-line m-fg) > (funcall (aref v (- 1 i)) 'mode-line (or m-bg bg)))) > (mapcar 'symbol-name > (cdr (assq (intern name) themes)))))) > > (provide 'set-theme) > > ;;; set-theme.el ends here is there a web site with lots of screenshots of different themes and their corresponding .el(s)