[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: User agent highlighting in gnus
From: |
Hadron |
Subject: |
Re: User agent highlighting in gnus |
Date: |
Mon, 20 Aug 2007 16:43:17 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux) |
Reiner Steib <reinersteib+gmane@imap.cc> writes:
> On Sun, Aug 19 2007, Hadron wrote:
>
>> Could you explain this block. Not being a lisp programmer I can't really
>> see how to set a nice "loud" face for all User-Agent or X-Newsreader with
>> "Mutt" in and another font for either with "Gnus" in and another for
>> either with any other face again.
>
> (add-to-list
> 'gnus-header-face-alist
> (list (concat
> "^"
> (regexp-opt '("User-Agent" "X-Mailer" "Newsreader" "X-Newsreader") t)
> ":.*Mutt")
> nil your-mutt-face))
>
> (add-to-list
> 'gnus-header-face-alist
> (list (concat
> "^"
> (regexp-opt '("User-Agent" "X-Mailer" "Newsreader" "X-Newsreader") t)
> ":.*Gnus")
> nil your-gnus-face))
>
> (add-to-list
> 'gnus-header-face-alist
> (list (concat
> "^"
> (regexp-opt '("User-Agent" "X-Mailer" "Newsreader" "X-Newsreader") t)
> ":.*") ;; other
> nil your-other-reader-face))
>
> You need to defface your-*-face. I'm not sure if the order works in
> this way. You may have to change it or add the APPEND argument of
> `add-to-list'.
>
> Bye, Reiner.
Just for google completion:
Other way around - here I hilite gnus and Outlook type and used quoting
for the face names available from list-faces-display from the facemenu+
library from drew adams.
,----
| (add-to-list
| 'gnus-header-face-alist
| (list (concat
| "^"
| (regexp-opt '("User-Agent" "X-Mailer" "Newsreader" "X-Newsreader") t)
| ":.*") ;; other
| nil font-lock-comment-face))
|
| (add-to-list
| 'gnus-header-face-alist
| (list (concat
| "^"
| (regexp-opt '("User-Agent" "X-Mailer" "Newsreader" "X-Newsreader") t)
| ":.*Outlook.*")
| nil 'gnus-emphasis-highlight-words))
|
| (add-to-list
| 'gnus-header-face-alist
| (list (concat
| "^"
| (regexp-opt '("User-Agent" "X-Mailer" "Newsreader" "X-Newsreader") t)
| ":.*Gnus.*")
| nil 'gnus-server-opened))
|
`----