From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/10247 Path: main.gmane.org!not-for-mail From: Christopher Davis Newsgroups: gmane.emacs.gnus.general Subject: Re: Colors on a TTY Date: 17 Mar 1997 14:56:13 -0500 Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.105) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035150150 23305 80.91.224.250 (20 Oct 2002 21:42:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:42:30 +0000 (UTC) Return-Path: Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.8.5/8.8.5) with SMTP id MAA16159 for ; Mon, 17 Mar 1997 12:31:57 -0800 Original-Received: from loiosh.kei.com (ckd@loiosh.kei.com [192.88.144.32]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Mon, 17 Mar 1997 20:57:18 +0100 Original-Received: (from ckd@localhost) by loiosh.kei.com (8.8.5/8.8.5) id OAA03250; Mon, 17 Mar 1997 14:56:13 -0500 (EST) Original-To: ding@ifi.uio.no In-Reply-To: stend@sten.org's message of 17 Mar 97 17:30:26 GMT X-Mailer: Gnus v5.4.25/XEmacs 19.15 X-Face: I8Alb*-ZdjN\/8k_QR,^l^m6GQB'S-B:}DVP].1HOw#tx:TX$k;Wl;4zqjWR|-jheM#? &beRf(!|0b0m=M~=%.Am>"QEY.(#Ys.%"s?z,hmwp&y0%p>9+T X-Attribution: ckd Xref: main.gmane.org gmane.emacs.gnus.general:10247 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:10247 Fire> == Firebeard Fire> How can Gnus be made to colorize headers/citations on a color TTY Fire> (like the Linux console, or a color xterm) in xemacs? Here's what I use. NOTES: - The trick is to use the color names available on TTYs as a fallback. Color TTYs don't have "blue3" but do have "blue", for example. - I try to leverage off the font-lock faces I define elsewhere (also chosen for TTY availability). That allows me to define "emphasize" and "de-emphasize" faces in only one place. - I only bother defining three levels of citing before colors repeat. Tweak this as you wish. - This was written BC (before custom) and might be duplicable using custom; I don't know, I haven't tried. - Void where prohibited by law, batteries not included. ================================================================ ;; more eye candy tweaks--face setup (setq gnus-article-button-face 'bold-italic) (make-face 'summary-selection "Face used for the selected message in a summary.") (or (face-differs-from-default-p 'summary-selection) (progn (set-face-foreground 'summary-selection (list "blue3" "blue")) (make-face-bold 'summary-selection))) (setq gnus-summary-selected-face 'summary-selection) (setq gnus-signature-face 'default) (setq gnus-cite-attribution-face 'bold) (make-face 'cite-face-1 "Face used for citations.") (or (face-differs-from-default-p 'cite-face-1) (set-face-foreground 'cite-face-1 (list "blue3" "blue"))) (make-face 'cite-face-2 "Face used for citations.") (or (face-differs-from-default-p 'cite-face-2) (set-face-foreground 'cite-face-2 (list "darkred" "red"))) (make-face 'cite-face-3 "Face used for citations.") (or (face-differs-from-default-p 'cite-face-3) (set-face-foreground 'cite-face-3 (list "darkgreen" "green"))) (setq gnus-cite-face-list (list 'cite-face-1 'cite-face-2 'cite-face-3)) (make-face 'header-name "Face used for displaying header names.") (or (face-differs-from-default-p 'header-name) (progn (set-face-foreground 'header-name (list "blue3" "blue")) (make-face-bold 'header-name))) (make-face 'header-contents "Face used for displaying header contents.") (or (face-differs-from-default-p 'header-contents) (progn (set-face-foreground 'header-contents (list "blue3" "blue")) )) (setq gnus-header-face-alist (cond ((not (eq (device-class) 'color)) '(("" bold italic))) (t (list (list "From" nil font-lock-keyword-face) (list "Subject" nil font-lock-function-name-face) (list "Newsgroups:.*," nil font-lock-function-name-face) (list "" 'header-name 'header-contents))))) ================================================================