From c602ade99a3608a2f0434b3cb5e34e191c787365 Mon Sep 17 00:00:00 2001 From: teranisi Date: Thu, 19 Sep 2002 06:16:12 +0000 Subject: [PATCH] * elmo-filter.el (elmo-folder-diff): Treat 'mark:' filter. --- elmo/ChangeLog | 2 ++ elmo/elmo-filter.el | 27 +++++++++++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) 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) -- 1.7.10.4