From: teranisi Date: Fri, 13 Jul 2001 14:56:59 +0000 (+0000) Subject: * elmo.el (elmo-msgdb-search): Use elmo-condition-in-msgdb-p instead X-Git-Tag: wl-2_7_2~21 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=eb7cd1a4985a020f90c841f9046d8997dd9981e1;p=elisp%2Fwanderlust.git * elmo.el (elmo-msgdb-search): Use elmo-condition-in-msgdb-p instead of elmo-condition-find-key. * elmo-util.el (elmo-condition-in-msgdb-p-internal): New function. (elmo-condition-in-msgdb-p): Ditto. (elmo-read-search-condition-internal): Don't set REQUIRE-MATCH argument. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 827ccd1..b413170 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,13 @@ +2001-07-13 Yuuichi Teranishi + + * elmo.el (elmo-msgdb-search): Use elmo-condition-in-msgdb-p instead + of elmo-condition-find-key. + + * elmo-util.el (elmo-condition-in-msgdb-p-internal): New function. + (elmo-condition-in-msgdb-p): Ditto. + (elmo-read-search-condition-internal): Don't set REQUIRE-MATCH + argument. + 2001-07-12 Yuuichi Teranishi * elmo-pipe.el (elmo-folder-pack-numbers): Define. diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index dbd4a5e..1b41b8f 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -161,7 +161,7 @@ File content is encoded with MIME-CHARSET." "Since" "Before" "ToCc" "!From" "!Subject" "!To" "!Cc" "!Body" "!Since" "!Before" "!ToCc") - elmo-msgdb-extra-fields)) nil t)) + elmo-msgdb-extra-fields)))) value) (setq field (if (string= field "") (setq field default) @@ -859,20 +859,25 @@ Return value is a cons cell of (STRUCTURE . REST)" (setq result (not result))) result)) -(defun elmo-condition-find-key-internal (condition key) +(defun elmo-condition-in-msgdb-p-internal (condition fields) (cond ((vectorp condition) - (if (string= (elmo-filter-key condition) key) + (if (not (member (elmo-filter-key condition) fields)) (throw 'found t))) ((or (eq (car condition) 'and) (eq (car condition) 'or)) - (elmo-condition-find-key-internal (nth 1 condition) key) - (elmo-condition-find-key-internal (nth 2 condition) key)))) - -(defun elmo-condition-find-key (condition key) - (catch 'found - (elmo-condition-find-key-internal condition key))) - + (elmo-condition-in-msgdb-p-internal (nth 1 condition) fields) + (elmo-condition-in-msgdb-p-internal (nth 2 condition) fields)))) + +(defun elmo-condition-in-msgdb-p (condition) + (not (catch 'found + (elmo-condition-in-msgdb-p-internal condition + (append + elmo-msgdb-extra-fields + '("last" "first" "from" + "subject" "to" "cc" "since" + "before")))))) + (defun elmo-buffer-field-condition-match (condition number number-list) (cond ((vectorp condition) diff --git a/elmo/elmo.el b/elmo/elmo.el index ad59646..d5dbfef 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -1294,7 +1294,7 @@ If update process is interrupted, return nil." (length (length overview)) (i 0) result) - (if (elmo-condition-find-key condition "body") + (if (not (elmo-condition-in-msgdb-p condition)) (elmo-folder-search folder condition number-list) (while overview (if (elmo-msgdb-search-internal condition (car overview)