+2001-07-13 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * 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 <teranisi@gohome.org>
* elmo-pipe.el (elmo-folder-pack-numbers): Define.
"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)
(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)
(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)