From 083fd1808dfac8ccf3fa2283a8daac1e38d8ea05 Mon Sep 17 00:00:00 2001 From: teranisi Date: Mon, 2 Oct 2000 03:26:50 +0000 Subject: [PATCH] elmo-nntp.el (elmo-nntp-search-primitive): Fixed problem when condition is 'unmatch'. --- elmo/ChangeLog | 2 ++ elmo/elmo-nntp.el | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 71fc603..ba9965f 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,6 +1,8 @@ 2000-10-02 Yuuichi Teranishi * 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. diff --git a/elmo/elmo-nntp.el b/elmo/elmo-nntp.el index 7d7de84..f27bac4 100644 --- a/elmo/elmo-nntp.el +++ b/elmo/elmo-nntp.el @@ -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 -- 1.7.10.4