* modb-standard.el (elmo-msgdb-list-flagged): Use append instead
authorhmurata <hmurata>
Sun, 7 Mar 2004 14:35:42 +0000 (14:35 +0000)
committerhmurata <hmurata>
Sun, 7 Mar 2004 14:35:42 +0000 (14:35 +0000)
of nconc.

* modb-entity.el (elmo-msgdb-match-condition-primitive): Added
argument handler.
(elmo-msgdb-message-match-condition): Follow the change above.

elmo/ChangeLog
elmo/elmo-pipe.el
elmo/modb-entity.el
elmo/modb-standard.el

index 967b930..d97d9a2 100644 (file)
@@ -1,3 +1,12 @@
+2004-03-07  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * 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  <lapis-lazuli@pop06.odn.ne.jp>
 
        * elmo-flag.el (elmo-folder-initialize): Complete abbreviated
index 9409c88..e40bf82 100644 (file)
 (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))
 
index de20c92..1487154 100644 (file)
@@ -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)
index 9bfcd09..04487fd 100644 (file)
 (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