(elmo-message-encache
wl-summary-buffer-elmo-folder
number))
+ (elmo-msgdb-set-cached msgdb number t)
(setq new-mark
- (cond
- ((string= mark
- elmo-msgdb-unread-uncached-mark)
- elmo-msgdb-unread-cached-mark)
- ((string= mark elmo-msgdb-new-mark)
- (setq wl-summary-buffer-new-count
- (- wl-summary-buffer-new-count 1))
- (setq wl-summary-buffer-unread-count
- (+ wl-summary-buffer-unread-count 1))
- elmo-msgdb-unread-cached-mark)
- ((string= mark elmo-msgdb-read-uncached-mark)
- nil)
- (t mark)))
- (elmo-msgdb-set-mark msgdb number new-mark)
- (or new-mark (setq new-mark " "))
- (wl-summary-set-mark-modified)
+ (or (elmo-message-mark wl-summary-buffer-elmo-folder
+ number)
+ " "))
(wl-summary-update-modeline)
(wl-folder-update-unread
(wl-summary-buffer-folder-name)
(msgdb (wl-summary-buffer-msgdb))
(number-alist (elmo-msgdb-get-number-alist msgdb))
(case-fold-search nil)
- mark number unread new-mark)
- (setq mark (wl-summary-persistent-mark))
- (cond
- ((or (string= mark elmo-msgdb-new-mark)
- (string= mark elmo-msgdb-unread-uncached-mark)
- (string= mark elmo-msgdb-important-mark))
- ;; noop
- )
- ((string= mark elmo-msgdb-unread-cached-mark)
- (setq new-mark elmo-msgdb-unread-uncached-mark))
- (t
- (setq new-mark elmo-msgdb-read-uncached-mark)))
+ mark number unread)
+ (setq mark (wl-summary-persistent-mark)
+ number (wl-summary-message-number)
+ new-mark (elmo-msgdb-set-cached msgdb number nil))
(when new-mark
- (setq number (wl-summary-message-number))
(delete-backward-char 1)
(insert new-mark)
(elmo-file-cache-delete
(folder wl-summary-buffer-elmo-folder)
(msgdb (wl-summary-buffer-msgdb))
(case-fold-search nil)
- cur-mark mark stat visible uncached new-mark marked)
- (setq number (or number (wl-summary-message-number))
- visible (if number
+ old-mark visible new-mark)
+ (setq visible (if number
(wl-summary-jump-to-msg number)
;; interactive
t)
- mark (elmo-msgdb-get-mark msgdb number))
- (cond
- ((string= mark elmo-msgdb-new-mark) ; N
- (setq stat 'new))
- ((string= mark elmo-msgdb-unread-uncached-mark) ; U
- (setq stat 'unread))
- ((string= mark elmo-msgdb-unread-cached-mark) ; !
- (setq stat 'unread))
- ((string= mark elmo-msgdb-read-uncached-mark) ; u
- (setq stat 'read))
- (t
- ;; no need to mark server.
- (setq no-folder-mark t)))
- (setq new-mark
- (if (and (if (elmo-message-use-cache-p folder number)
- (not (elmo-folder-local-p folder)))
- (not (elmo-file-cache-exists-p
- (elmo-message-field wl-summary-buffer-elmo-folder
- number 'message-id))))
- elmo-msgdb-read-uncached-mark
- nil))
+ number (or number (wl-summary-message-number))
+ mark (elmo-message-mark folder number))
;; folder mark.
- (unless no-folder-mark
- (elmo-folder-mark-as-read folder (list number)))
- (cond ((eq stat 'unread)
- (setq wl-summary-buffer-unread-count
- (1- wl-summary-buffer-unread-count)))
- ((eq stat 'new)
- (setq wl-summary-buffer-new-count
- (1- wl-summary-buffer-new-count))))
+ (elmo-folder-mark-as-read folder (list number) no-folder-mark)
+ (elmo-msgdb-set-cached msgdb number t)
+ (setq new-mark (elmo-message-mark folder number))
+ ;;
+ ;; elmo-folder-mark-as-read should return unread numbers?
+ ;;
+ (wl-summary-count-unread)
(wl-summary-update-modeline)
- (wl-folder-update-unread
- (wl-summary-buffer-folder-name)
- (+ wl-summary-buffer-unread-count
- wl-summary-buffer-new-count))
- (when stat
- ;; set mark on buffer
- (when visible
- (unless (string= (wl-summary-persistent-mark) new-mark)
- (delete-backward-char 1)
- (insert (or new-mark " "))))
- ;; set msgdb mark.
- (unless (string= mark new-mark)
- (elmo-msgdb-set-mark msgdb number new-mark))
- (wl-summary-set-mark-modified))
+ ;; set mark on buffer
+ (when visible
+ (unless (string= (wl-summary-persistent-mark) new-mark)
+ (delete-backward-char 1)
+ (insert (or new-mark " "))))
(if (and visible wl-summary-highlight)
(wl-highlight-summary-current-line nil nil t))
(set-buffer-modified-p nil)
- (if stat
+ (if (member mark (elmo-msgdb-unread-marks))
(run-hooks 'wl-summary-unread-message-hook))
number ;return value
)))