- (fld-name (wl-folder-get-folder-name-by-id
- (get-text-property (point) 'wl-folder-entity-id)))
- fregexp fsymbol bol eol matched type extent num type)
- (beginning-of-line)
- (setq bol (point))
- (save-excursion (end-of-line) (setq eol (point)))
- (if (and numbers (nth 0 numbers) (nth 1 numbers))
- (progn
- (setq fsymbol
- (let ((unsync (nth 0 numbers))
- (unread (nth 1 numbers)))
- (cond ((and unsync (eq unsync 0))
- (if (and unread (> unread 0))
- 'wl-highlight-folder-unread-face
- 'wl-highlight-folder-zero-face))
- ((and unsync
- (>= unsync wl-folder-many-unsync-threshold))
- 'wl-highlight-folder-many-face)
- (t
- 'wl-highlight-folder-few-face))))
- (put-text-property bol eol 'face fsymbol)
- (setq matched t)))
- (catch 'highlighted
- (while highlights
- (setq fregexp (symbol-value
- (intern (format "wl-highlight-folder-%s-regexp"
- (car highlights)))))
- (if (not wl-highlight-group-folder-by-numbers)
- (setq fsymbol (intern (format "wl-highlight-folder-%s-face"
- (car highlights)))))
- (when (looking-at fregexp)
- (put-text-property bol eol 'face fsymbol)
- (setq matched t)
- (throw 'highlighted nil))
- (setq highlights (cdr highlights))))
- (if (not matched)
- (if (looking-at (format "^[ ]*\\(%s\\|%s\\)"
- wl-folder-unsubscribe-mark
- wl-folder-removed-mark))
- (put-text-property bol eol 'face
- 'wl-highlight-folder-killed-face)
- (put-text-property bol eol 'face
- 'wl-highlight-folder-unknown-face)))
- (if wl-use-highlight-mouse-line
- (wl-highlight-folder-mouse-line)))))
-
+ (text-face
+ (cond ((looking-at wl-highlight-folder-opened-regexp)
+ 'wl-highlight-folder-opened-face)
+ ((looking-at wl-highlight-folder-closed-regexp)
+ 'wl-highlight-folder-closed-face)
+ (t
+ (if (looking-at (format "^[ \t]*\\(%s\\|%s\\)"
+ wl-folder-unsubscribe-mark
+ wl-folder-removed-mark))
+ 'wl-highlight-folder-killed-face
+ 'wl-highlight-folder-unknown-face)))))
+ (if (and wl-highlight-folder-by-numbers
+ numbers (nth 0 numbers) (nth 1 numbers)
+ (re-search-forward "[0-9-]+/[0-9-]+/[0-9-]+" end t))
+ (let* ((unsync (nth 0 numbers))
+ (unread (nth 1 numbers))
+ (face (cond
+ ((and unsync (zerop unsync))
+ (if (and unread (zerop unread))
+ 'wl-highlight-folder-zero-face
+ 'wl-highlight-folder-unread-face))
+ ((and unsync
+ (>= unsync wl-folder-many-unsync-threshold))
+ 'wl-highlight-folder-many-face)
+ (t
+ 'wl-highlight-folder-few-face))))
+ (if (numberp wl-highlight-folder-by-numbers)
+ (progn
+ (put-text-property start (match-beginning 0) 'face text-face)
+ (put-text-property (match-beginning 0) (point) 'face face))
+ ;; Remove previous face.
+ (put-text-property start (point) 'face nil)
+ (put-text-property start (point) 'face face))
+ (goto-char start))
+ (put-text-property start end 'face text-face)))
+ (when wl-use-highlight-mouse-line
+ (wl-highlight-folder-mouse-line))))
+