result if `visible-only' is nil and `in-msgdb' is non-nil.
* elmo-util.el (elmo-uniq-list): Added optional argument
`delete-function'.
2003-09-27 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+ * elmo.el (elmo-folder-list-messages): Append killed messages into
+ result if `visible-only' is nil and `in-msgdb' is non-nil.
+
+ * elmo-util.el (elmo-uniq-list): Added optional argument
+ `delete-function'.
+
* modb.el (elmo-msgdb-flag-count): New API.
* modb-standard.el (modb-standard): Added slot flag-count.
(replace-match "\n"))
(buffer-string))))
-(defun elmo-uniq-list (lst)
+(defun elmo-uniq-list (lst &optional delete-function)
"Distractively uniqfy elements of LST."
+ (setq delete-function (or delete-function #'delete))
(let ((tmp lst))
- (while tmp (setq tmp
- (setcdr tmp
- (and (cdr tmp)
- (delete (car tmp)
- (cdr tmp)))))))
+ (while tmp
+ (setq tmp
+ (setcdr tmp
+ (and (cdr tmp)
+ (funcall delete-function
+ (car tmp)
+ (cdr tmp)))))))
lst)
(defun elmo-list-insert (list element after)
(setq list (elmo-msgdb-list-messages (elmo-folder-msgdb folder))))
(if visible-only
(elmo-living-messages list killed-list)
- list)))
+ (if in-msgdb
+ (elmo-uniq-list
+ (nconc (elmo-number-set-to-number-list killed-list) list)
+ #'delq)
+ list))))
(luna-define-generic elmo-folder-list-unreads (folder)
"Return a list of unread message numbers contained in FOLDER.")