2004-10-03 Yuuichi Teranishi <teranisi@gohome.org>
+ * elmo.el (elmo-message-flags): Abolish optional argument `msgid'.
+ (elmo-generic-folder-append-messages): If src message exists but
+ has no flag, pass (read) for the FLAG argument of
+ `elmo-folder-append-buffer'. Otherwise, pass nil.
+
+ * elmo-split.el (elmo-split-subr): Likewise.
+
+ * elmo-pipe.el (elmo-message-flags): Abolish optional argument `msgid'.
+
+ * elmo-multi.el (elmo-message-flags): Ditto.
+
+ * elmo-filter.el (elmo-message-flags): Ditto.
+
* elmo.el (elmo-folder-append-buffer): Fix docstring.
(elmo-generic-folder-append-messages): If elmo-message-flags return nil,
pass (read) for the FLAG argument of elmo-folder-append-buffer.
(elmo-filter-folder-target-internal folder)
number flag))
-(luna-define-method elmo-message-flags ((folder elmo-filter-folder) number
- &optional msgid)
+(luna-define-method elmo-message-flags ((folder elmo-filter-folder) number)
(elmo-message-flags (elmo-filter-folder-target-internal folder)
- number msgid))
+ number))
(luna-define-method elmo-message-set-cached ((folder elmo-filter-folder)
number cached)
(let ((pair (elmo-multi-real-folder-number folder number)))
(elmo-message-flag-available-p (car pair) (cdr pair) flag)))
-(luna-define-method elmo-message-flags ((folder elmo-multi-folder) number
- &optional msgid)
+(luna-define-method elmo-message-flags ((folder elmo-multi-folder) number)
(let ((pair (elmo-multi-real-folder-number folder number)))
- (elmo-message-flags (car pair) (cdr pair) msgid)))
+ (elmo-message-flags (car pair) (cdr pair))))
(defun elmo-multi-split-numbers (folder numlist &optional as-is)
(let ((numbers (sort numlist '<))
(luna-define-method elmo-folder-count-flags ((folder elmo-pipe-folder))
(elmo-folder-count-flags (elmo-pipe-folder-dst-internal folder)))
-(luna-define-method elmo-message-flags ((folder elmo-pipe-folder) number
- &optional msgid)
- (elmo-message-flags (elmo-pipe-folder-dst-internal folder) number msgid))
+(luna-define-method elmo-message-flags ((folder elmo-pipe-folder) number)
+ (elmo-message-flags (elmo-pipe-folder-dst-internal folder) number))
(luna-define-method elmo-message-field ((folder elmo-pipe-folder)
number field)
nil (current-buffer) 'unread))
(run-hooks 'elmo-split-fetch-hook)
(setq elmo-split-message-entity (mime-parse-buffer))
- (setq flags (elmo-message-flags
- folder
- msg
- (elmo-msgdb-get-message-id-from-buffer)))
+ (setq flags
+ (let ((this-id (elmo-message-field folder
+ msg
+ 'message-id)))
+ (and this-id
+ (string= this-id
+ (elmo-msgdb-get-message-id-from-buffer))
+ (or (elmo-message-flags folder msg)
+ ;; message exists, but no flag.
+ '(read)))))
(catch 'terminate
(dolist (rule (append elmo-split-rule default-rule))
(setq elmo-split-match-string-internal nil)
(luna-define-generic elmo-message-file-p (folder number)
"Return t if message in the FOLDER with NUMBER is a file.")
-(luna-define-generic elmo-message-flags (folder number &optional msgid)
+(luna-define-generic elmo-message-flags (folder number)
"Return a list of flags.
FOLDER is a ELMO folder structure.
-NUMBER is a number of the message.
-If optional argument MSGID is specified,
-the message with NUMBER checks whether it has MSGID.")
+NUMBER is a number of the message.")
(luna-define-method elmo-message-flag-available-p ((folder elmo-folder) number
flag)
(elmo-msgdb-flag-available-p (elmo-folder-msgdb folder) flag))
-(luna-define-method elmo-message-flags ((folder elmo-folder) number
- &optional msgid)
- (if msgid
- (let ((this-id (elmo-message-field folder number 'message-id)))
- (and this-id
- (string= this-id msgid)
- (elmo-msgdb-flags (elmo-folder-msgdb folder) number)))
- (elmo-msgdb-flags (elmo-folder-msgdb folder) number)))
+(luna-define-method elmo-message-flags ((folder elmo-folder) number)
+ (elmo-msgdb-flags (elmo-folder-msgdb folder) number))
(defsubst elmo-message-flagged-p (folder number flag)
"Return non-nil if the message is set FLAG.
(> (buffer-size) 0)
(elmo-folder-append-buffer
folder
- (or (elmo-message-flags
- src-folder
- (car numbers)
- (elmo-msgdb-get-message-id-from-buffer))
- '(read))
+ (let ((this-id (elmo-message-field src-folder (car numbers)
+ 'message-id)))
+ (and this-id
+ (string= this-id
+ (elmo-msgdb-get-message-id-from-buffer))
+ (or (elmo-message-flags src-folder (car numbers))
+ '(read))))
(if same-number (car numbers))))))
(error (setq failure t)))
;; FETCH & APPEND finished