From: teranisi Date: Wed, 19 Dec 2001 08:19:33 +0000 (+0000) Subject: * elmo-util.el (elmo-file-field-primitive-condition-match): Fixed X-Git-Tag: wl-2_8_0pre2~5 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c58091e59a4d41c87ec1f4619a6efa51d2c08159;p=elisp%2Fwanderlust.git * 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. --- 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)