From db01fedca6f61f632720316b337f8d16eb76b10c Mon Sep 17 00:00:00 2001 From: hmurata Date: Sun, 7 Mar 2004 14:35:42 +0000 Subject: [PATCH] * modb-standard.el (elmo-msgdb-list-flagged): Use append instead of nconc. * modb-entity.el (elmo-msgdb-match-condition-primitive): Added argument handler. (elmo-msgdb-message-match-condition): Follow the change above. --- elmo/ChangeLog | 9 +++++++++ elmo/elmo-pipe.el | 2 +- elmo/modb-entity.el | 36 +++++++++++++++++------------------- elmo/modb-standard.el | 4 ++-- 4 files changed, 29 insertions(+), 22 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 967b930..d97d9a2 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,12 @@ +2004-03-07 Hiroya Murata + + * modb-standard.el (elmo-msgdb-list-flagged): Use append instead + of nconc. + + * modb-entity.el (elmo-msgdb-match-condition-primitive): Added + argument handler. + (elmo-msgdb-message-match-condition): Follow the change above. + 2004-02-29 Hiroya Murata * elmo-flag.el (elmo-folder-initialize): Complete abbreviated diff --git a/elmo/elmo-pipe.el b/elmo/elmo-pipe.el index 9409c88..e40bf82 100644 --- a/elmo/elmo-pipe.el +++ b/elmo/elmo-pipe.el @@ -362,7 +362,7 @@ (luna-define-method elmo-message-folder ((folder elmo-pipe-folder) number) (elmo-pipe-folder-dst-internal folder)) - + (require 'product) (product-provide (provide 'elmo-pipe) (require 'elmo-version)) diff --git a/elmo/modb-entity.el b/elmo/modb-entity.el index de20c92..1487154 100644 --- a/elmo/modb-entity.el +++ b/elmo/modb-entity.el @@ -300,7 +300,8 @@ Header region is supposed to be narrowed.") ((handler modb-legacy-entity-handler) condition entity flags numbers) (cond ((vectorp condition) - (elmo-msgdb-match-condition-primitive condition entity flags numbers)) + (elmo-msgdb-match-condition-primitive handler condition + entity flags numbers)) ((eq (car condition) 'and) (let ((lhs (elmo-msgdb-message-match-condition handler (nth 1 condition) @@ -338,7 +339,11 @@ Header region is supposed to be narrowed.") entity flags numbers))))))) ;; -(defun elmo-msgdb-match-condition-primitive (condition entity flags numbers) +(defun elmo-msgdb-match-condition-primitive (handler + condition + entity + flags + numbers) (catch 'unresolved (let ((key (elmo-filter-key condition)) (case-fold-search t) @@ -347,8 +352,7 @@ Header region is supposed to be narrowed.") ((string= key "last") (setq result (<= (length (memq (elmo-msgdb-message-entity-number - (elmo-message-entity-handler entity) - entity) + handler entity) numbers)) (string-to-int (elmo-filter-value condition))))) ((string= key "first") @@ -356,8 +360,7 @@ Header region is supposed to be narrowed.") (length numbers) (length (memq (elmo-msgdb-message-entity-number - (elmo-message-entity-handler entity) - entity) + handler entity) numbers))) (string-to-int (elmo-filter-value condition))))) ((string= key "flag") @@ -380,33 +383,28 @@ Header region is supposed to be narrowed.") (setq result (string-match (elmo-filter-value condition) (elmo-msgdb-message-entity-field - (elmo-message-entity-handler entity) - entity 'from t)))) + handler entity 'from t)))) ((string= key "subject") (setq result (string-match (elmo-filter-value condition) (elmo-msgdb-message-entity-field - (elmo-message-entity-handler entity) - entity 'subject t)))) + handler entity 'subject t)))) ((string= key "to") (setq result (string-match (elmo-filter-value condition) (elmo-msgdb-message-entity-field - (elmo-message-entity-handler entity) - entity 'to)))) + handler entity 'to)))) ((string= key "cc") (setq result (string-match (elmo-filter-value condition) (elmo-msgdb-message-entity-field - (elmo-message-entity-handler entity) - entity 'cc)))) + handler entity 'cc)))) ((or (string= key "since") (string= key "before")) (let ((field-date (elmo-date-make-sortable-string (timezone-fix-time (elmo-msgdb-message-entity-field - (elmo-message-entity-handler entity) - entity 'date) + handler entity 'date) (current-time-zone) nil))) (specified-date (elmo-date-make-sortable-string @@ -417,9 +415,9 @@ Header region is supposed to be narrowed.") (string< specified-date field-date)) (string< field-date specified-date))))) ((member key elmo-msgdb-extra-fields) - (let ((extval (elmo-msgdb-message-entity-field - (elmo-message-entity-handler entity) - entity (intern key)))) + (let ((extval (elmo-msgdb-message-entity-field handler + entity + (intern key)))) (when (stringp extval) (setq result (string-match (elmo-filter-value condition) diff --git a/elmo/modb-standard.el b/elmo/modb-standard.el index 9bfcd09..04487fd 100644 --- a/elmo/modb-standard.el +++ b/elmo/modb-standard.el @@ -344,9 +344,9 @@ (luna-define-method elmo-msgdb-list-flagged ((msgdb modb-standard) flag) (let ((flags (case flag (digest - (nconc '(unread)(elmo-get-global-flags t t))) + (append '(unread) (elmo-get-global-flags t t))) (any - (nconc '(unread answered)(elmo-get-global-flags t t))))) + (append '(unread answered) (elmo-get-global-flags t t))))) entry matched) (case flag (read -- 1.7.10.4