argument change in the wl-summary-create-line.
(wl-thread-insert-entity-sub): Ditto.
* wl-summary.el (wl-summary-detect-mark-position): Follow the
argument change in the wl-summary-create-line.
(wl-summary-insert-sequential): Ditto.
(wl-summary-update-thread): Ditto.
(wl-summary-persistent-mark-string): New inline function.
(wl-summary-message-mark): Use it.
(wl-summary-create-line): Abolish argument wl-persistent-mark
and added wl-flags, wl-cached.
* wl-highlight.el (wl-highlight-summary-line-string): Changed argument
mark to flags.
(wl-highlight-summary-current-line): Decide the face not by the
persistent mark but flags.
+2003-08-23 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * wl-thread.el (wl-thread-update-line-on-buffer-sub): Follow the
+ argument change in the wl-summary-create-line.
+ (wl-thread-insert-entity-sub): Ditto.
+
+ * wl-summary.el (wl-summary-detect-mark-position): Follow the
+ argument change in the wl-summary-create-line.
+ (wl-summary-insert-sequential): Ditto.
+ (wl-summary-update-thread): Ditto.
+ (wl-summary-persistent-mark-string): New inline function.
+ (wl-summary-message-mark): Use it.
+ (wl-summary-create-line): Abolish argument wl-persistent-mark
+ and added wl-flags, wl-cached.
+
+ * wl-highlight.el (wl-highlight-summary-line-string): Changed argument
+ mark to flags.
+ (wl-highlight-summary-current-line): Decide the face not by the
+ persistent mark but flags.
+
2003-08-22 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* wl-vars.el (wl-summary-new-mark, wl-summary-important-mark,
(put-text-property bol (match-end 0) 'face face)))
(put-text-property bol eol 'face text-face)))))
-(defun wl-highlight-summary-line-string (line mark temp-mark indent)
+(defun wl-highlight-summary-line-string (line flags 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)))
+ (or (memq 'new flags) (memq 'unread flags)))
(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)))
+ (or (memq 'new flags) (memq 'unread flags)))
(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)
+ ((memq 'new flags)
(setq fsymbol 'wl-highlight-summary-new-face))
- ((member mark (list wl-summary-unread-cached-mark
- wl-summary-unread-uncached-mark))
+ ((memq 'unread flags)
(setq fsymbol 'wl-highlight-summary-unread-face))
- ((member mark (list wl-summary-answered-cached-mark
- wl-summary-answered-uncached-mark))
+ ((memq 'answered flags)
(setq fsymbol 'wl-highlight-summary-answered-face))
- ((or (string= mark wl-summary-important-mark))
+ ((memq 'important flags)
(setq fsymbol 'wl-highlight-summary-important-face))
((string= temp-mark wl-summary-score-below-mark)
(setq fsymbol 'wl-highlight-summary-low-read-face))
(interactive)
(save-excursion
(let ((inhibit-read-only t)
- (case-fold-search nil) temp-mark status-mark
+ (case-fold-search nil) temp-mark
(deactivate-mark nil)
+ (number (wl-summary-message-number))
fsymbol action bol eol matched thread-top looked-at dest ds)
(end-of-line)
(setq eol (point))
(beginning-of-line)
(setq bol (point))
- (setq status-mark (wl-summary-persistent-mark))
(setq temp-mark (wl-summary-temp-mark))
(when (setq action (assoc temp-mark wl-summary-mark-action-list))
(setq fsymbol (nth 5 action))
(setq dest (nth 2 action)))
(if (not fsymbol)
(cond
+ ((null number))
((and (string= temp-mark wl-summary-score-over-mark)
- (member status-mark (list wl-summary-unread-cached-mark
- wl-summary-unread-uncached-mark
- wl-summary-new-mark)))
+ (or (elmo-message-flagged-p wl-summary-buffer-elmo-folder
+ number 'new)
+ (elmo-message-flagged-p wl-summary-buffer-elmo-folder
+ number 'unread)))
(setq fsymbol 'wl-highlight-summary-high-unread-face))
((and (string= temp-mark wl-summary-score-below-mark)
- (member status-mark (list wl-summary-unread-cached-mark
- wl-summary-unread-uncached-mark
- wl-summary-new-mark)))
+ (or (elmo-message-flagged-p wl-summary-buffer-elmo-folder
+ number 'new)
+ (elmo-message-flagged-p wl-summary-buffer-elmo-folder
+ number 'unread)))
(setq fsymbol 'wl-highlight-summary-low-unread-face))
- ((string= status-mark wl-summary-new-mark)
+ ((elmo-message-flagged-p wl-summary-buffer-elmo-folder
+ number 'new)
(setq fsymbol 'wl-highlight-summary-new-face))
- ((member status-mark (list wl-summary-unread-cached-mark
- wl-summary-unread-uncached-mark))
+ ((elmo-message-flagged-p wl-summary-buffer-elmo-folder
+ number 'unread)
(setq fsymbol 'wl-highlight-summary-unread-face))
- ((member status-mark (list wl-summary-answered-cached-mark
- wl-summary-answered-uncached-mark))
+ ((elmo-message-flagged-p wl-summary-buffer-elmo-folder
+ number 'answered)
(setq fsymbol 'wl-highlight-summary-answered-face))
- ((string= status-mark wl-summary-important-mark)
+ ((elmo-message-flagged-p wl-summary-buffer-elmo-folder
+ number 'important)
(setq fsymbol 'wl-highlight-summary-important-face))
;; score mark
((string= temp-mark wl-summary-score-below-mark)
;;
(t (if (null
(wl-thread-entity-get-parent-entity
- (wl-thread-get-entity (wl-summary-message-number))))
+ (wl-thread-get-entity number)))
(setq fsymbol 'wl-highlight-summary-thread-top-face)
(setq fsymbol 'wl-highlight-summary-normal-face)))))
- (put-text-property bol eol 'face fsymbol)
+ (when fsymbol (put-text-property bol eol 'face fsymbol))
(when dest
(put-text-property (next-single-property-change
(next-single-property-change
(let ((column wl-summary-buffer-number-column)
(formatter wl-summary-buffer-line-formatter)
(dummy-temp (char-to-string 200))
- (dummy-persistent (char-to-string 201))
+ (wl-summary-new-mark (char-to-string 201)) ; bind only for the check.
temp persistent)
(with-temp-buffer
(setq wl-summary-buffer-number-column column
:size 100)
nil
dummy-temp
- dummy-persistent))
+ '(new)
+ nil))
(goto-char (point-min))
(setq temp (save-excursion
(when (search-forward dummy-temp nil t)
(current-column)))
persistent (save-excursion
- (when (search-forward dummy-persistent nil t)
+ (when (search-forward wl-summary-new-mark nil t)
(current-column)))))
(setq wl-summary-buffer-temp-mark-column temp
wl-summary-buffer-persistent-mark-column persistent)))
(defun wl-summary-insert-sequential (entity folder &rest args)
(let ((inhibit-read-only t)
+ (number (elmo-message-entity-number entity))
buffer-read-only)
(goto-char (point-max))
(wl-summary-insert-line
(wl-summary-create-line entity nil nil
- (wl-summary-message-mark
- folder
- (elmo-message-entity-number
- entity))))
+ (elmo-message-flags
+ wl-summary-buffer-elmo-folder
+ number)
+ (elmo-message-cached-p
+ wl-summary-buffer-elmo-folder
+ number)))
(setq wl-summary-buffer-number-list
(wl-append wl-summary-buffer-number-list
(list (elmo-message-entity-number entity))))
entity
parent-entity
nil
- (wl-summary-message-mark wl-summary-buffer-elmo-folder number)
+ (elmo-message-flags wl-summary-buffer-elmo-folder number)
+ (elmo-message-cached-p wl-summary-buffer-elmo-folder number)
(wl-thread-maybe-get-children-num number)
(wl-thread-make-indent-string thr-entity)
(wl-thread-entity-get-linked thr-entity)))))))
(wl-summary-get-score-mark number)
" ")))
+(defsubst wl-summary-persistent-mark-string (folder flags cached)
+ "Return the persistent mark string.
+The mark is decided according to the FOLDER, FLAGS and CACHED."
+ (let ((priorities wl-summary-flag-priority-list)
+ mark)
+ (while (and (null mark) priorities)
+ (when (memq (car priorities) flags)
+ (setq mark
+ (case (car priorities)
+ (new
+ wl-summary-new-mark)
+ (important
+ wl-summary-important-mark)
+ (answered
+ (if cached
+ wl-summary-answered-cached-mark
+ wl-summary-answered-uncached-mark))
+ (unread
+ (if cached
+ wl-summary-unread-cached-mark
+ wl-summary-unread-uncached-mark)))))
+ (setq priorities (cdr priorities)))
+ (or mark
+ (if (or cached (elmo-folder-local-p folder))
+ nil
+ wl-summary-read-uncached-mark))))
+
(defsubst wl-summary-message-mark (folder number)
"Return mark of the message."
(ignore-errors
- (let ((priorities wl-summary-flag-priority-list)
- (cachedp (elmo-message-cached-p folder number))
- (flags (elmo-message-flags folder number))
- mark)
- (while (and (null mark) priorities)
- (when (memq (car priorities) flags)
- (setq mark
- (case (car priorities)
- (new
- wl-summary-new-mark)
- (important
- wl-summary-important-mark)
- (answered
- (if cachedp
- wl-summary-answered-cached-mark
- wl-summary-answered-uncached-mark))
- (unread
- (if cachedp
- wl-summary-unread-cached-mark
- wl-summary-unread-uncached-mark)))))
- (setq priorities (cdr priorities)))
- (or mark
- (if (or cachedp (elmo-folder-local-p folder))
- nil
- wl-summary-read-uncached-mark)))))
+ (wl-summary-persistent-mark-string
+ folder
+ (elmo-message-flags folder number)
+ (elmo-message-cached-p folder number))))
(defsubst wl-summary-persistent-mark ()
"Return persistent-mark string of current line."
(defun wl-summary-create-line (wl-message-entity
wl-parent-message-entity
wl-temp-mark
- wl-persistent-mark
+ wl-flags
+ wl-cached
&optional
wl-thr-children-number
wl-thr-indent-string
wl-thr-linked)
"Create a summary line."
(let ((wl-mime-charset wl-summary-buffer-mime-charset)
+ (wl-persistent-mark (wl-summary-persistent-mark-string
+ wl-summary-buffer-elmo-folder
+ wl-flags
+ wl-cached))
(elmo-mime-charset wl-summary-buffer-mime-charset)
(elmo-lang wl-summary-buffer-weekday-name-lang)
(wl-datevec (or (ignore-errors (timezone-fix-time
- (elmo-msgdb-overview-entity-get-date
+ (elmo-msgdb-overview-entity-get-date
wl-message-entity)
nil
wl-summary-fix-timezone))
wl-message-entity))))
(if wl-summary-highlight
(wl-highlight-summary-line-string line
- wl-persistent-mark
+ wl-flags
wl-temp-mark
wl-thr-indent-string))
line))
(when (setq message-entity
(elmo-message-entity wl-summary-buffer-elmo-folder
msg))
- (wl-summary-insert-line
+ (wl-summary-insert-line
(wl-summary-create-line
message-entity
(elmo-message-entity wl-summary-buffer-elmo-folder
parent-msg)
temp-mark
- (wl-summary-message-mark wl-summary-buffer-elmo-folder msg)
+ (elmo-message-flags wl-summary-buffer-elmo-folder
+ msg)
+ (elmo-message-cached-p wl-summary-buffer-elmo-folder
+ msg)
(if wl-thread-insert-force-opened
nil
(wl-thread-maybe-get-children-num msg))
(elmo-message-entity wl-summary-buffer-elmo-folder
(nth 0 parent-entity))
temp-mark
- (wl-summary-message-mark wl-summary-buffer-elmo-folder msg-num)
+ (elmo-message-flags wl-summary-buffer-elmo-folder
+ msg-num)
+ (elmo-message-cached-p wl-summary-buffer-elmo-folder
+ msg-num)
(if wl-thread-insert-force-opened
nil
(wl-thread-maybe-get-children-num msg-num))