haomiao <[EMAIL PROTECTED]> writes: > (defun gnus-user-format-function-z (header) > "test dynamic color" > (if (string= > (format-time-string "%m%d") > (format-time-string > "%m%d" > (safe-date-to-time (mail-header-date header)))) > ;; then > (set-face-foreground 'face-3 "red") > ;; else > (set-face-foreground 'face-3 "blue")) > "")
Don't use `set-face-foreground'. Try this instead: (defun gnus-user-format-function-z (header) "Test dynamic color" (let ((date-time (safe-date-to-time (mail-header-date header)))) (if (string= date-time (format-time-string "%m%d")) (propertize date-time 'face my-red-face) (propertize date-time 'face my-blue-face)))) And define `my-red-face' and `my-blue-face'. -- Bastien _______________________________________________ info-gnus-english mailing list info-gnus-english@gnu.org http://lists.gnu.org/mailman/listinfo/info-gnus-english