-(defun wl-highlight-summary-line-string (line mark temp-mark indent)
- (let (fsymbol action)
- (cond ((and (string= temp-mark wl-summary-score-over-mark)
- (member mark (list wl-summary-unread-cached-mark
- wl-summary-unread-uncached-mark
- wl-summary-new-mark)))
- (setq fsymbol 'wl-highlight-summary-high-unread-face))
- ((and (string= temp-mark wl-summary-score-below-mark)
- (member mark (list wl-summary-unread-cached-mark
- wl-summary-unread-uncached-mark
- wl-summary-new-mark)))
- (setq fsymbol 'wl-highlight-summary-low-unread-face))
- ((setq action (assoc temp-mark wl-summary-mark-action-list))
- (setq fsymbol (nth 5 action)))
- ((string= mark wl-summary-new-mark)
- (setq fsymbol 'wl-highlight-summary-new-face))
- ((member mark (list wl-summary-unread-cached-mark
- wl-summary-unread-uncached-mark))
- (setq fsymbol 'wl-highlight-summary-unread-face))
- ((member mark (list wl-summary-answered-cached-mark
- wl-summary-answered-uncached-mark))
- (setq fsymbol 'wl-highlight-summary-answered-face))
- ((or (string= mark wl-summary-important-mark))
- (setq fsymbol 'wl-highlight-summary-important-face))
- ((string= temp-mark wl-summary-score-below-mark)
- (setq fsymbol 'wl-highlight-summary-low-read-face))
- ((string= temp-mark wl-summary-score-over-mark)
- (setq fsymbol 'wl-highlight-summary-high-read-face))
- (t (if (zerop (length indent))
- (setq fsymbol 'wl-highlight-summary-thread-top-face)
- (setq fsymbol 'wl-highlight-summary-normal-face))))
+(defsubst wl-highlight-summary-line-face-spec (flags temp-mark indent)
+ "Return a cons cell of (face . argument)."
+ (let (action)
+ (if (setq action (assoc temp-mark wl-summary-mark-action-list))
+ (cons (nth 5 action) (nth 2 action))
+ (cond
+ ((and (string= temp-mark wl-summary-score-over-mark)
+ (or (memq 'new flags) (memq 'unread flags)))
+ '(wl-highlight-summary-high-unread-face))
+ ((and (string= temp-mark wl-summary-score-below-mark)
+ (or (memq 'new flags) (memq 'unread flags)))
+ '(wl-highlight-summary-low-unread-face))
+ ((let ((priorities wl-summary-persistent-mark-priority-list)
+ (fl wl-summary-flag-alist)
+ face result global-flags)
+ (while (and (null result) priorities)
+ (if (and (eq (car priorities) 'flag)
+ (setq global-flags
+ (elmo-get-global-flags flags 'ignore-preserved)))
+ (while fl
+ (when (memq (car (car fl)) global-flags)
+ (setq result
+ (progn
+ (setq face
+ (intern (format
+ "wl-highlight-summary-%s-flag-face"
+ (car (car fl)))))
+ (when (find-face face)
+ (list face)))
+ fl nil))
+ (setq fl (cdr fl)))
+ (when (memq (car priorities) flags)
+ (setq result
+ (progn (setq face
+ (intern (format
+ "wl-highlight-summary-%s-face"
+ (car priorities))))
+ (when (find-face face)
+ (list face))))))
+ (setq priorities (cdr priorities)))
+ result))
+ ((string= temp-mark wl-summary-score-below-mark)
+ '(wl-highlight-summary-low-read-face))
+ ((string= temp-mark wl-summary-score-over-mark)
+ '(wl-highlight-summary-high-read-face))
+ (t (if indent
+ '(wl-highlight-summary-normal-face)
+ '(wl-highlight-summary-thread-top-face)))))))
+
+(defun wl-highlight-summary-line-flag-folder (number beg end &optional string)
+ ;; help-echo for flag folder.
+ (let (flag-info)
+ (current-buffer)
+ (when (eq (elmo-folder-type-internal wl-summary-buffer-elmo-folder)
+ 'flag)
+ (setq flag-info
+ (elmo-flag-folder-referrer wl-summary-buffer-elmo-folder
+ number))
+ (if flag-info
+ (put-text-property beg end 'help-echo
+ (concat "The message exists in "
+ (mapconcat
+ (lambda (pair)
+ (concat (car pair) "/"
+ (number-to-string
+ (cdr pair))))
+ flag-info ","))
+ string)))))
+
+(defun wl-highlight-summary-line-string (number line flags temp-mark indent)
+ (let ((fsymbol (car (wl-highlight-summary-line-face-spec
+ flags
+ temp-mark
+ (> (length indent) 0)))))