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

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

Re: howto define dynamic color with gnus-summary-line-format


From: Bastien
Subject: Re: howto define dynamic color with gnus-summary-line-format
Date: Tue, 26 Feb 2008 00:51:19 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

bojohan+news@dd.chalmers.se (Johan Bockgård) writes:

> haomiao <miaohaoz@ustc.edu> writes:
>
>> (defun gnus-user-format-function-a (header)
>>    "Test dynamic color"
>>    (let  ((date-time (format-time-string "%m/%d" (safe-date-to-time
>> (mail-header-date header)))))
>>       (if (string= date-time (format-time-string "%m/%d"))
>>          (propertize date-time 'face 'my-red-face 'mouse-face 'my-blue-
>> face)
>>          (propertize date-time 'face 'my-blue-face 'mouse-face 'my-red-
>> face))))
>>
>> It seems that gnus will modify the face property of the text
>> returned,  but not the mouse-face property.
>
> Try
>
>     [...]
>     (propertize date-time 'face 'my-red-face 'mouse-face 'my-blue-face
>                 'gnus-face t)
>     (propertize date-time 'face 'my-blue-face 'mouse-face 'my-red-face
>                 'gnus-face t)

It works nice for me.  

Could you explain this a bit more?  Why is the 'gnus-face property
necessary so that the 'face property is taken into account?

BTW, I did notice that (global-font-lock-mode -1) doesn't prevent 
Gnus from being fontified.  Is it related to a specific handling of
faces in Gnus?

Thanks in advance for details,

-- 
Bastien




reply via email to

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