elmo-nntp.el (elmo-nntp-search-primitive): Fixed problem when condition is
authorteranisi <teranisi>
Mon, 2 Oct 2000 03:26:50 +0000 (03:26 +0000)
committerteranisi <teranisi>
Mon, 2 Oct 2000 03:26:50 +0000 (03:26 +0000)
 'unmatch'.

elmo/ChangeLog
elmo/elmo-nntp.el

index 71fc603..ba9965f 100644 (file)
@@ -1,6 +1,8 @@
 2000-10-02  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * elmo-nntp.el (elmo-nntp-search-primitive): Decode header field.
+       (elmo-nntp-search-primitive): Fixed problem when condition is
+       'unmatch'.
 
        * elmo-util.el (elmo-buffer-field-primitive-condition-match): Fixed.
 
index 7d7de84..f27bac4 100644 (file)
@@ -1205,6 +1205,8 @@ Returns a list of cons cells like (NUMBER . VALUE)"
             (key-datestr (elmo-date-make-sortable-string key-date))
             (since (string= "since" search-key))
             result)
+       (if (eq (elmo-filter-type condition) 'unmatch)
+           (setq since (not since)))
        (setq result
              (delq nil
                    (mapcar
@@ -1227,6 +1229,7 @@ Returns a list of cons cells like (NUMBER . VALUE)"
          result)))
      (t 
       (let ((val (elmo-filter-value condition))
+           (negative (eq (elmo-filter-type condition) 'unmatch))
            (case-fold-search t)
            result)
        (setq result
@@ -1237,7 +1240,8 @@ Returns a list of cons cells like (NUMBER . VALUE)"
                                         (eword-decode-string
                                          (decode-mime-charset-string
                                           (cdr pair) elmo-mime-charset)))
-                          (car pair)))
+                          (unless negative (car pair))
+                        (if negative (car pair))))
                     (elmo-nntp-retrieve-field spec search-key
                                               from-msgs))))
        (if from-msgs