+2002-09-24  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-summary.el (wl-summary-mark-as-read-all): Bind new-mark.
+       (wl-summary-mark-as-read): Don't call elmo-message-set-cached.
+
+       * wl-vars.el (toplevel): Require 'elmo-msgdb.
+
 2002-09-20  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * wl-summary.el (wl-summary-buffer-mark-modified): Abolish
 
   (wl-mode-line-buffer-identification '(wl-summary-buffer-mode-line))
   (easy-menu-add wl-summary-mode-menu)
   (when wl-summary-lazy-highlight
-    (if wl-on-xemacs 
+    (if wl-on-xemacs
        (progn
          (make-local-variable 'pre-idle-hook)
          (add-hook 'pre-idle-hook 'wl-highlight-summary-window))
             (inhibit-read-only t)
             (buffer-read-only nil)
             (case-fold-search nil)
-            msg mark)
+            msg mark new-mark)
        (message "Setting all msgs as read...")
        (elmo-folder-mark-as-read folder
                                  (elmo-folder-list-unreads
        (wl-summary-update-modeline)
        (wl-folder-update-unread
         (wl-summary-buffer-folder-name)
-                (+ wl-summary-buffer-unread-count
+        (+ wl-summary-buffer-unread-count
            wl-summary-buffer-new-count)))
       (when visible
        (unless (string= (wl-summary-persistent-mark) new-mark)
       (when (member mark (elmo-msgdb-unread-marks))
        ;; folder mark.
        (elmo-folder-mark-as-read folder (list number) no-folder-mark))
-      (elmo-message-set-cached folder number t)
       (setq new-mark (elmo-message-mark folder number))
       (unless no-modeline-update
        ;; Update unread numbers.
        (wl-summary-update-modeline)
        (wl-folder-update-unread
         (wl-summary-buffer-folder-name)
-                (+ wl-summary-buffer-unread-count
+        (+ wl-summary-buffer-unread-count
            wl-summary-buffer-new-count)))
       ;; set mark on buffer
       (when visible
   "Return non-nil when summary line format is changed."
   (not (string=
        wl-summary-buffer-line-format
-       (or (elmo-object-load (expand-file-name 
+       (or (elmo-object-load (expand-file-name
                               wl-summary-line-format-file
                               (elmo-folder-msgdb-path
                                wl-summary-buffer-elmo-folder))
       (if downward
          (forward-line 1)
        (forward-line -1))
-      (setq skip (or (string-match skip-tmark-regexp 
+      (setq skip (or (string-match skip-tmark-regexp
                                   (save-excursion
                                     (wl-summary-temp-mark)))
                     (and skip-pmark-regexp