From: teranisi Date: Thu, 19 Sep 2002 06:16:12 +0000 (+0000) Subject: * elmo-filter.el (elmo-folder-diff): Treat 'mark:' filter. X-Git-Tag: elmo-mark-restart~126 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c602ade99a3608a2f0434b3cb5e34e191c787365;p=elisp%2Fwanderlust.git * elmo-filter.el (elmo-folder-diff): Treat 'mark:' filter. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index cbe58ea..08ef145 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,7 @@ 2002-09-19 Yuuichi Teranishi + * elmo-filter.el (elmo-folder-diff): Treat 'mark:' filter. + * elmo.el (elmo-folder-unmark-read): Added argument `ignore-flag'. * elmo-filter.el (elmo-folder-unmark-read): Ditto. diff --git a/elmo/elmo-filter.el b/elmo/elmo-filter.el index b8d29bb..aab8395 100644 --- a/elmo/elmo-filter.el +++ b/elmo/elmo-filter.el @@ -206,15 +206,23 @@ (luna-define-method elmo-folder-diff :around ((folder elmo-filter-folder) &optional numbers) - (if (not (and (vectorp (elmo-filter-folder-condition-internal - folder)) - (string-match "^last$" - (elmo-filter-key - (elmo-filter-folder-condition-internal - folder))))) - (cons nil (cdr (elmo-folder-diff (elmo-filter-folder-target-internal - folder)))) - (luna-call-next-method))) + (let ((condition (elmo-filter-folder-condition-internal folder)) + diff) + (if (vectorp condition) + (cond + ((and (string= (elmo-filter-key condition) "mark") + (or (string= (elmo-filter-value condition) "any") + (string= (elmo-filter-value condition) "unread"))) + (setq diff (elmo-folder-diff (elmo-filter-folder-target-internal + folder))) + (if (consp diff) + (cons (car diff) (car diff)) + (cons (car diff) (nth 1 diff)))) + ((string-match "^last$" (elmo-filter-key condition)) + (cons nil (cdr (elmo-folder-diff (elmo-filter-folder-target-internal + folder))))) + (t (luna-call-next-method))) + (luna-call-next-method)))) (luna-define-method elmo-folder-status ((folder elmo-filter-folder)) (elmo-folder-status @@ -285,7 +293,6 @@ numbers) (luna-call-next-method)) - (luna-define-method elmo-folder-unmark-important :around ((folder elmo-filter-folder) numbers)