* elmo.el (elmo-generic-folder-append-messages): Check return value of
elmo-folder-append-buffer.
+ (elmo-folder-encache): Added optional argument `read'.
+ (elmo-message-encache): Ditto.
* elmo-dop.el (elmo-folder-append-buffer-dop-delayed): Ditto.
((folder elmo-folder) important-mark)
t)
-(defun elmo-folder-encache (folder numbers)
- "Encache messages in the FOLDER with NUMBERS."
+(defun elmo-folder-encache (folder numbers &optional unread)
+ "Encache messages in the FOLDER with NUMBERS.
+If UNREAD is non-nil, messages are not marked as read."
(dolist (number numbers)
- (elmo-message-encache folder number)))
+ (elmo-message-encache folder number unread)))
-(luna-define-generic elmo-message-encache (folder number)
- "Encache message in the FOLDER with NUMBER.")
+(luna-define-generic elmo-message-encache (folder number &optional read)
+ "Encache message in the FOLDER with NUMBER.
+If READ is non-nil, message is marked as read.")
-(luna-define-method elmo-message-encache ((folder elmo-folder) number)
+(luna-define-method elmo-message-encache ((folder elmo-folder) number
+ &optional read)
(elmo-message-fetch
folder number
(elmo-make-fetch-strategy 'entire
(elmo-file-cache-get-path
(elmo-message-field
folder number 'message-id)))
- nil nil 'unread))
+ nil nil (not read)))
(luna-define-generic elmo-message-fetch (folder number strategy
&optional
+2001-10-03 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * wl-summary.el (wl-summary-mark-as-important): If message is
+ already cached, set messag as read, otherwise encache and mark as read.
+
2001-10-02 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
* wl-summary.el (wl-summary-jump-to-current-message): Don't go to
(elmo-msgdb-mark-set mark-alist
number
wl-summary-important-mark))
- (unless (elmo-file-cache-exists-p message-id)
+ (if (elmo-file-cache-exists-p message-id)
+ (elmo-folder-mark-as-read folder (list number))
;; Force cache message.
- (elmo-message-encache folder number))
+ (elmo-message-encache folder number 'read))
(unless no-server-update
(elmo-msgdb-global-mark-set message-id
wl-summary-important-mark)))