From c58091e59a4d41c87ec1f4619a6efa51d2c08159 Mon Sep 17 00:00:00 2001 From: teranisi Date: Wed, 19 Dec 2001 08:19:33 +0000 Subject: [PATCH] * elmo-util.el (elmo-file-field-primitive-condition-match): Fixed unmatch condition checking. * elmo-localdir.el (elmo-folder-search): Don't short cut if unmatch condition. --- elmo/ChangeLog | 8 ++++++++ elmo/elmo-localdir.el | 2 ++ elmo/elmo-util.el | 10 ++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 07f3d8a..f8d4a70 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,11 @@ +2001-12-19 Yuuichi Teranishi + + * elmo-util.el (elmo-file-field-primitive-condition-match): Fixed + unmatch condition checking. + + * elmo-localdir.el (elmo-folder-search): Don't short cut if unmatch + condition. + 2001-12-17 Yoichi NAKAYAMA * elmo.el (elmo-folder-confirm-appends): Fixed docstring. diff --git a/elmo/elmo-localdir.el b/elmo/elmo-localdir.el index b6311d1..cd571ea 100644 --- a/elmo/elmo-localdir.el +++ b/elmo/elmo-localdir.el @@ -332,12 +332,14 @@ (cond ;; short cut. ((and (vectorp condition) + (not (eq (elmo-filter-type condition) 'unmatch)) (string= (elmo-filter-key condition) "last")) (nthcdr (max (- (length msgs) (string-to-int (elmo-filter-value condition))) 0) msgs)) ((and (vectorp condition) + (not (eq (elmo-filter-type condition) 'unmatch)) (string= (elmo-filter-key condition) "first")) (let ((rest (nthcdr (string-to-int (elmo-filter-value condition) ) msgs))) diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index ae2512b..b6dc41d 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -897,11 +897,15 @@ Return value is a cons cell of (STRUCTURE . REST)" (cond ((string= (elmo-filter-key condition) "last") (setq result (<= (length (memq number number-list)) - (string-to-int (elmo-filter-value condition))))) + (string-to-int (elmo-filter-value condition)))) + (if (eq (elmo-filter-type condition) 'unmatch) + (setq result (not result)))) ((string= (elmo-filter-key condition) "first") (setq result (< (- (length number-list) (length (memq number number-list))) - (string-to-int (elmo-filter-value condition))))) + (string-to-int (elmo-filter-value condition)))) + (if (eq (elmo-filter-type condition) 'unmatch) + (setq result (not result)))) (t (elmo-set-work-buf (as-binary-input-file (insert-file-contents file)) @@ -911,8 +915,6 @@ Return value is a cons cell of (STRUCTURE . REST)" (setq result (elmo-buffer-field-primitive-condition-match condition number number-list))))) - (if (eq (elmo-filter-type condition) 'unmatch) - (setq result (not result))) result)) (defun elmo-file-field-condition-match (file condition number number-list) -- 1.7.10.4