* wl-util.el (wl-regexp-opt): Define as an alias for elmo-regexp-opt.
authorteranisi <teranisi>
Sun, 27 Oct 2002 04:46:40 +0000 (04:46 +0000)
committerteranisi <teranisi>
Sun, 27 Oct 2002 04:46:40 +0000 (04:46 +0000)
* wl-thread.el (wl-thread-open-all-unread): Use
elmo-folder-list-flagged instead of
elmo-folder-list-messages-mark-match.

* wl-summary.el (wl-summary-sync-marks): Use elmo-folder-list-flagged
instead of elmo-folder-list-messages-mark-match.
(wl-summary-move-spec-alist): New variable.
(wl-summary-move-spec-plugged-alist,
wl-summary-move-spec-unplugged-alist): Abolish.
(wl-summary-next-message): Follow the change above.
(wl-summary-save-view-cache): Call wl-summary-delete-all-temp-marks
with 'no-msg' argument.

* wl-message.el (wl-message-buffer-prefetch-move-spec-alist): New
variable.
(wl-message-buffer-prefetch-move-spec-plugged-alist,
wl-message-buffer-prefetch-move-spec-unplugged-alist): Abolish.
(wl-message-buffer-prefetch-get-next): Follow the change above.

wl/ChangeLog
wl/wl-message.el
wl/wl-summary.el
wl/wl-thread.el
wl/wl-util.el

index dd8ced7..2a350e8 100644 (file)
@@ -1,3 +1,26 @@
+2002-10-27  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-util.el (wl-regexp-opt): Define as an alias for elmo-regexp-opt.
+
+       * wl-thread.el (wl-thread-open-all-unread): Use
+       elmo-folder-list-flagged instead of
+       elmo-folder-list-messages-mark-match.
+
+       * wl-summary.el (wl-summary-sync-marks): Use elmo-folder-list-flagged
+       instead of elmo-folder-list-messages-mark-match.
+       (wl-summary-move-spec-alist): New variable.
+       (wl-summary-move-spec-plugged-alist,
+       wl-summary-move-spec-unplugged-alist): Abolish.
+       (wl-summary-next-message): Follow the change above.
+       (wl-summary-save-view-cache): Call wl-summary-delete-all-temp-marks
+       with 'no-msg' argument.
+
+       * wl-message.el (wl-message-buffer-prefetch-move-spec-alist): New
+       variable.
+       (wl-message-buffer-prefetch-move-spec-plugged-alist,
+       wl-message-buffer-prefetch-move-spec-unplugged-alist): Abolish.
+       (wl-message-buffer-prefetch-get-next): Follow the change above.
+
 2002-10-26  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * wl-version.el (wl-version): Changed codename.
index 2e238a8..8528f41 100644 (file)
@@ -586,18 +586,14 @@ Returns non-nil if bottom of message."
      'wl-message-buffer-prefetch-subr
      folder number count summary charset)))
 
-(defvar wl-message-buffer-prefetch-move-spec-plugged-alist nil)
-(defvar wl-message-buffer-prefetch-move-spec-unplugged-alist nil)
+(defvar wl-message-buffer-prefetch-move-spec-alist nil)
 
 (defun wl-message-buffer-prefetch-get-next (folder number summary)
   (if (buffer-live-p summary)
       (with-current-buffer summary
-       (let ((wl-summary-move-spec-plugged-alist
-              (or wl-message-buffer-prefetch-move-spec-plugged-alist
-                  wl-summary-move-spec-plugged-alist))
-             (wl-summary-move-spec-unplugged-alist
-              (or wl-message-buffer-prefetch-move-spec-unplugged-alist
-                  wl-summary-move-spec-unplugged-alist))
+       (let ((wl-summary-move-spec-alist
+              (or wl-message-buffer-prefetch-move-spec-alist
+                  wl-summary-move-spec-alist))
              (next number))
          (while (and (setq next (funcall
                                  wl-message-buffer-prefetch-get-next-function
index 0214481..3513a77 100644 (file)
@@ -1853,7 +1853,7 @@ If ARG is non-nil, checking is omitted."
   (let ((last-progress 0)
        (folder wl-summary-buffer-elmo-folder)
        (i 0)
-       importants unreads
+       answereds importants unreads answereds-in-db
        importants-in-db unreads-in-db diff diffs
        mes progress)
     ;; synchronize marks.
@@ -1861,12 +1861,15 @@ If ARG is non-nil, checking is omitted."
                    wl-summary-buffer-elmo-folder)
                   'internal))
       (message "Updating marks...")
-      (setq importants-in-db (elmo-folder-list-messages-mark-match
+      (setq importants-in-db (elmo-folder-list-flagged
                              wl-summary-buffer-elmo-folder
-                             (regexp-quote elmo-msgdb-important-mark))
-           unreads-in-db (elmo-folder-list-messages-mark-match
+                             'important 'in-msgdb)
+           unreads-in-db (elmo-folder-list-flagged
                           wl-summary-buffer-elmo-folder
-                          (wl-regexp-opt (elmo-msgdb-unread-marks)))
+                          'unread 'in-msgdb)
+           answereds-in-db (elmo-folder-list-flagged
+                            wl-summary-buffer-elmo-folder
+                            'answered 'in-msgdb)
            importants (elmo-uniq-list
                        (nconc
                         (elmo-folder-list-importants
@@ -4160,40 +4163,25 @@ If ARG, exit virtual folder."
        (wl-match-string 1 wday-str)
       (elmo-date-get-week year month mday))))
 
-(defvar wl-summary-move-spec-plugged-alist
-  (` ((new . ((t . nil)
-             (p . (, elmo-msgdb-new-mark))
-             (p . (, (wl-regexp-opt
-                      (list elmo-msgdb-unread-uncached-mark
-                            elmo-msgdb-unread-cached-mark))))
-             (p . (, (regexp-quote elmo-msgdb-important-mark)))))
-      (unread . ((t . nil)
-                (p . (, (wl-regexp-opt
-                         (list elmo-msgdb-new-mark
-                               elmo-msgdb-unread-uncached-mark
-                               elmo-msgdb-unread-cached-mark))))
-                (p . (, (regexp-quote elmo-msgdb-important-mark))))))))
-
-(defvar wl-summary-move-spec-unplugged-alist
-  (` ((new . ((t . nil)
-             (p . (, elmo-msgdb-unread-cached-mark))
-             (p . (, (regexp-quote elmo-msgdb-important-mark)))))
-      (unread . ((t . nil)
-                (p . (, elmo-msgdb-unread-cached-mark))
-                (p . (, (regexp-quote elmo-msgdb-important-mark))))))))
+(defvar wl-summary-move-spec-alist
+  '((new . ((t . nil)
+           (p . new)
+           (p . unread)
+           (p . important)))
+    (unread . ((t . nil)
+              (p . unread)
+              (p . important)))))
 
 (defsubst wl-summary-next-message (num direction hereto)
   (if wl-summary-buffer-next-message-function
       (funcall wl-summary-buffer-next-message-function num direction hereto)
     (let ((cur-spec (cdr (assq wl-summary-move-order
-                              (if (elmo-folder-plugged-p
-                                   wl-summary-buffer-elmo-folder)
-                                  wl-summary-move-spec-plugged-alist
-                                wl-summary-move-spec-unplugged-alist))))
+                              wl-summary-move-spec-alist)))
          (nums (memq num (if (eq direction 'up)
                              (reverse wl-summary-buffer-number-list)
                            wl-summary-buffer-number-list)))
-         marked-list nums2)
+         (plugged (elmo-folder-plugged-p wl-summary-buffer-elmo-folder))
+         flagged-list nums2)
       (unless hereto (setq nums (cdr nums)))
       (setq nums2 nums)
       (if cur-spec
@@ -4201,12 +4189,16 @@ If ARG, exit virtual folder."
            (while cur-spec
              (setq nums nums2)
              (cond ((eq (car (car cur-spec)) 'p)
-                    (if (setq marked-list
-                              (elmo-folder-list-messages-mark-match
+                    (if (setq flagged-list
+                              (elmo-folder-list-flagged
                                wl-summary-buffer-elmo-folder
                                (cdr (car cur-spec))))
                         (while nums
-                          (if (memq (car nums) marked-list)
+                          (if (and (memq (car nums) flagged-list)
+                                   (or plugged
+                                       (elmo-message-cached-p
+                                        wl-summary-buffer-elmo-folder
+                                        (car nums))))
                               (throw 'done (car nums)))
                           (setq nums (cdr nums)))))
                    ((eq (car (car cur-spec)) 't)
@@ -4276,7 +4268,7 @@ If ARG, exit virtual folder."
                      wl-summary-buffer-copy-list copy-list
                      wl-summary-buffer-delete-list delete-list
                      wl-summary-buffer-temp-mark-column temp-column)
-               (wl-summary-delete-all-temp-marks)
+               (wl-summary-delete-all-temp-marks 'no-msg)
                (encode-coding-region
                 (point-min) (point-max)
                 (or (and wl-on-mule ; one in mcs-ltn1(apel<10.4) cannot take 2 arg.
index c9ca3d6..0696269 100644 (file)
@@ -360,12 +360,8 @@ ENTITY is returned."
 
 (defun wl-thread-open-all-unread ()
   (interactive)
-  (dolist (number (elmo-folder-list-messages-mark-match
-                  wl-summary-buffer-elmo-folder
-                  (wl-regexp-opt (list elmo-msgdb-unread-uncached-mark
-                                       elmo-msgdb-unread-cached-mark
-                                       elmo-msgdb-new-mark
-                                       elmo-msgdb-important-mark))))
+  (dolist (number (elmo-folder-list-flagged wl-summary-buffer-elmo-folder
+                                           'digest 'in-msgdb))
     (wl-thread-entity-force-open (wl-thread-get-entity number))))
 
 (defsubst wl-thread-maybe-get-children-num (msg)
index 0230b97..2d9c86c 100644 (file)
@@ -898,6 +898,7 @@ is enclosed by at least one regexp grouping construct."
              close-paren))))
 
 (defalias 'wl-expand-newtext 'elmo-expand-newtext)
+(defalias 'wl-regexp-opt 'elmo-regexp-opt)
 
 (defun wl-region-exists-p ()
   "Return non-nil if a region exists on current buffer."