From: hmurata Date: Sat, 27 Sep 2003 16:13:22 +0000 (+0000) Subject: * elmo.el (elmo-folder-list-messages): Append killed messages into X-Git-Tag: wl-2_11_19~36 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=72cdf5a4ff3ecbfd539015f2ffa1f9bbd45c63fb;p=elisp%2Fwanderlust.git * 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'. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 55c662c..eaa5627 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,11 @@ 2003-09-27 Hiroya Murata + * 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. diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index bb8c321..9dffada 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -332,14 +332,17 @@ Return value is a cons cell of (STRUCTURE . REST)" (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) diff --git a/elmo/elmo.el b/elmo/elmo.el index 5e327ff..53499cc 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -230,7 +230,11 @@ If second optional IN-MSGDB is non-nil, only messages in the msgdb are listed.") (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.")