`elmo-msgdb-delete-msgs'.
* elmo.el (elmo-folder-count-flags): Don't use
`elmo-msgdb-get-mark-alist'.
(elmo-folder-detach-messages): Follow the API change.
2003-09-07 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+ * elmo-msgdb.el (elmo-msgdb-delete-messages): Renamed from
+ `elmo-msgdb-delete-msgs'.
+
+ * elmo.el (elmo-folder-count-flags): Don't use
+ `elmo-msgdb-get-mark-alist'.
+ (elmo-folder-detach-messages): Follow the API change.
+
* elmo.el (elmo-folder-list-messages): Append killed messages into
result if `visible-only' is nil.
;; FIELD-VALUE elmo-msgdb-get-field MSGDB NUMBER FIELD
;; MSGDB elmo-msgdb-append MSGDB MSGDB-APPEND
;; MSGDB elmo-msgdb-clear MSGDB
-;; elmo-msgdb-delete-msgs MSGDB NUMBERS
+;; elmo-msgdb-delete-messages MSGDB NUMBERS
;; elmo-msgdb-sort-by-date MSGDB
;;;
msgdb)
(elmo-make-msgdb)))
-(defun elmo-msgdb-delete-msgs (msgdb msgs)
+(defun elmo-msgdb-delete-messages (msgdb msgs)
"Delete MSGS from MSGDB
content of MSGDB is changed."
(let* ((overview (car msgdb))
(luna-define-method elmo-folder-count-flags ((folder elmo-folder))
(let ((new 0)
(unreads 0)
- (answered 0))
- (dolist (elem (elmo-msgdb-get-mark-alist (elmo-folder-msgdb folder)))
+ (answered 0)
+ flags)
+ (dolist (number (elmo-folder-list-messages folder 'visible 'in-msgdb))
+ (setq flags (elmo-message-flags folder number))
(cond
- ((string= (cadr elem) elmo-msgdb-new-mark)
+ ((memq 'new flags)
(incf new))
- ((member (cadr elem) (elmo-msgdb-unread-marks))
+ ((memq 'unread flags)
(incf unreads))
- ((member (cadr elem) (elmo-msgdb-answered-marks))
+ ((memq 'answered flags)
(incf answered))))
(list new unreads answered)))
(luna-define-method elmo-folder-detach-messages ((folder elmo-folder)
numbers)
- (elmo-msgdb-delete-msgs (elmo-folder-msgdb folder) numbers))
+ (elmo-msgdb-delete-messages (elmo-folder-msgdb folder) numbers))
(luna-define-generic elmo-folder-length (folder)
"Return number of messages in the FOLDER.")