info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Highlight words in the subject line?


From: Bastien
Subject: Re: Highlight words in the subject line?
Date: Wed, 05 Mar 2008 15:53:41 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

(I sent this to ding@gnus.org, but It seems down.)

Hi,

I'm using this to highlight words in the subject line:

,----
| (add-hook 'gnus-summary-prepared-hook 'highlight-my-words)
| 
| (defun highlight-my-words nil
|   "Highlight some words."
|   (let (buffer-read-only)
|     (save-excursion
|       (goto-char (point-min))
|       (while (re-search-forward "ducation\\|OLPC\\|wiki" nil t)
|       (add-text-properties 
|        (match-beginning 0) (match-end 0)
|        (list 'face my-summary-highlight-words)))))
|   (setq buffer-read-only t))
| 
| (setq my-summary-highlight-words '((t (:foreground "yellow"))))
`----

But this is only a workaround.  It would be nice to have it implemented
in Gnus, maybe with a new group parameter: `highlight-summary-words'.

In the meanwhile, how can I access the group parameters from the
prepared summary, and use the value of highlight-words instead of a
default regexp?

Thanks for any pointer,

-- 
Bastien




reply via email to

[Prev in Thread] Current Thread [Next in Thread]