* elsp-sa.el (elmo-spam-register-spam-buffer): Don't specify '--forget'.
[elisp/wanderlust.git] / elmo / elmo-util.el
index 24dca71..7021069 100644 (file)
@@ -864,11 +864,12 @@ the directory becomes empty after deletion."
           (setq result (search-forward (elmo-filter-value condition)
                                        nil t))))
      (t
-      (let ((fval (std11-field-body (elmo-filter-key condition))))
+      (dolist (fval (elmo-multiple-field-body (elmo-filter-key condition)))
        (if (eq (length fval) 0) (setq fval nil))
        (if fval (setq fval (eword-decode-string fval)))
-       (setq result (and fval (string-match
-                               (elmo-filter-value condition) fval))))))
+       (setq result (or result
+                        (and fval (string-match
+                                   (elmo-filter-value condition) fval)))))))
     (if (eq (elmo-filter-type condition) 'unmatch)
        (setq result (not result)))
     result))
@@ -954,7 +955,11 @@ the directory becomes empty after deletion."
         file (nth 2 condition) number number-list)))))
 
 (defmacro elmo-get-hash-val (string hashtable)
-  `(symbol-value (intern-soft ,string ,hashtable)))
+  (static-if (fboundp 'unintern)
+      `(symbol-value (intern-soft ,string ,hashtable))
+    `(let ((sym (intern-soft ,string ,hashtable)))
+       (and (boundp sym)
+           (symbol-value sym)))))
 
 (defmacro elmo-set-hash-val (string value hashtable)
   `(set (intern ,string ,hashtable) ,value))
@@ -1297,7 +1302,7 @@ But if optional argument AUTO is non-nil, DEFAULT is returned."
          (throw 'found t))
       (setq slist (cdr slist)))))
 
-(cond ((fboundp 'member-ignore-case)
+(static-cond ((fboundp 'member-ignore-case)
        (defalias 'elmo-string-member-ignore-case 'member-ignore-case))
       ((fboundp 'compare-strings)
        (defun elmo-string-member-ignore-case (elt list)
@@ -1757,9 +1762,10 @@ associated with SECTION."
         (method (completing-read (format "Expire by (%s): "
                                          elmo-cache-expire-default-method)
                                  '(("size" . "size")
-                                   ("age" . "age")))))
-    (if (string= method "")
-       (setq method elmo-cache-expire-default-method))
+                                   ("age" . "age"))
+                                 nil t)))
+    (when (string= method "")
+      (setq method elmo-cache-expire-default-method))
     (funcall (intern (concat "elmo-cache-expire-by-" method)))))
 
 (defun elmo-read-float-value-from-minibuffer (prompt &optional initial)