* Re: Colors on a TTY
[not found] <vpafo2toi5.fsf@grendel.tivoli.com>
@ 1997-03-17 19:56 ` Christopher Davis
0 siblings, 0 replies; only message in thread
From: Christopher Davis @ 1997-03-17 19:56 UTC (permalink / raw)
Fire> == Firebeard <stend@sten.org>
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)))))
================================================================
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-03-17 19:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <vpafo2toi5.fsf@grendel.tivoli.com>
1997-03-17 19:56 ` Colors on a TTY Christopher Davis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).