* elmo.el (elmo-folder-mark-as-read): Added argument `ignore-flag'.
authorteranisi <teranisi>
Tue, 17 Sep 2002 12:22:16 +0000 (12:22 +0000)
committerteranisi <teranisi>
Tue, 17 Sep 2002 12:22:16 +0000 (12:22 +0000)
(elmo-folder-mark-as-read): Follow the API change.

* elmo-pipe.el (elmo-folder-mark-as-read): Follow the API change.

* elmo-nntp.el (elmo-folder-mark-as-read): Set :before qualifier.

* elmo-net.el (elmo-folder-unmark-important): Set :before qualifier.
(elmo-folder-mark-as-important): Ditto.
(elmo-folder-unmark-read): Ditto.
(elmo-folder-mark-as-read): Ditto.
(elmo-folder-unmark-answered): Ditto.
(elmo-folder-mark-as-answered): Ditto.

* elmo-multi.el (elmo-folder-mark-as-important): Set :before qualifier.
(elmo-folder-unmark-important): Ditto.
(elmo-folder-mark-as-read): Ditto.
(elmo-folder-unmark-read): Ditto.
(elmo-folder-mark-as-answered): Ditto.
(elmo-folder-unmark-answered): Ditto.

* elmo-mark.el (toplevel): Removed some mark method definitions.

* elmo-map.el (elmo-map-folder-unmark-answered): New method.
(elmo-map-folder-mark-as-answered): Ditto.
(elmo-folder-unmark-important): Add :before qualifier.
(elmo-folder-mark-as-important): Ditto.
(elmo-folder-unmark-read): Ditto.
(elmo-folder-mark-as-read): Ditto.
(elmo-folder-unmark-answered): Define.
(elmo-folder-mark-as-answered): Ditto.

* elmo-maildir.el (elmo-map-folder-mark-as-answered): Define.
(elmo-map-folder-unmark-answered): Ditto.

* elmo-filter.el (elmo-folder-mark-as-read): Follow the API change.

elmo/ChangeLog
elmo/elmo-filter.el
elmo/elmo-maildir.el
elmo/elmo-map.el
elmo/elmo-mark.el
elmo/elmo-multi.el
elmo/elmo-net.el
elmo/elmo-nntp.el
elmo/elmo-pipe.el
elmo/elmo.el

index 7322efe..79c7ebe 100644 (file)
@@ -1,5 +1,42 @@
 2002-09-17  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * elmo.el (elmo-folder-mark-as-read): Added argument `ignore-flag'.
+       (elmo-folder-mark-as-read): Follow the API change.
+
+       * elmo-pipe.el (elmo-folder-mark-as-read): Follow the API change.
+
+       * elmo-nntp.el (elmo-folder-mark-as-read): Set :before qualifier.
+
+       * elmo-net.el (elmo-folder-unmark-important): Set :before qualifier.
+       (elmo-folder-mark-as-important): Ditto.
+       (elmo-folder-unmark-read): Ditto.
+       (elmo-folder-mark-as-read): Ditto.
+       (elmo-folder-unmark-answered): Ditto.
+       (elmo-folder-mark-as-answered): Ditto.
+
+       * elmo-multi.el (elmo-folder-mark-as-important): Set :before qualifier.
+       (elmo-folder-unmark-important): Ditto.
+       (elmo-folder-mark-as-read): Ditto.
+       (elmo-folder-unmark-read): Ditto.
+       (elmo-folder-mark-as-answered): Ditto.
+       (elmo-folder-unmark-answered): Ditto.
+
+       * elmo-mark.el (toplevel): Removed some mark method definitions.
+
+       * elmo-map.el (elmo-map-folder-unmark-answered): New method.
+       (elmo-map-folder-mark-as-answered): Ditto.
+       (elmo-folder-unmark-important): Add :before qualifier.
+       (elmo-folder-mark-as-important): Ditto.
+       (elmo-folder-unmark-read): Ditto.
+       (elmo-folder-mark-as-read): Ditto.
+       (elmo-folder-unmark-answered): Define.
+       (elmo-folder-mark-as-answered): Ditto.
+
+       * elmo-maildir.el (elmo-map-folder-mark-as-answered): Define.
+       (elmo-map-folder-unmark-answered): Ditto.
+
+       * elmo-filter.el (elmo-folder-mark-as-read): Follow the API change.
+
        * elmo-net.el (elmo-folder-unmark-important): Added :around qualifier.
        (elmo-folder-mark-as-important): Ditto.
        (elmo-folder-unmark-read): Ditto.
index 94e2d57..3ce13bb 100644 (file)
 
 (luna-define-method elmo-folder-mark-as-read :around ((folder
                                                       elmo-filter-folder)
-                                                     numbers)
+                                                     numbers
+                                                     &optional ignore-flag)
   (elmo-folder-mark-as-read (elmo-filter-folder-target-internal folder)
-                           numbers)
+                           numbers ignore-flag)
   (luna-call-next-method))
 
 (luna-define-method elmo-folder-unmark-read :around ((folder
index eb07a04..f3e7ae7 100644 (file)
@@ -274,6 +274,16 @@ LOCATION."
                                                 locs)
   (elmo-maildir-delete-mark-msgs folder locs ?S))
 
+(luna-define-method elmo-map-folder-mark-as-answered ((folder
+                                                      elmo-maildir-folder)
+                                                     locs)
+  (elmo-maildir-set-mark-msgs folder locs ?R))
+
+(luna-define-method elmo-map-folder-unmark-answered ((folder
+                                                     elmo-maildir-folder)
+                                                    locs)
+  (elmo-maildir-delete-mark-msgs folder locs ?R))
+
 (luna-define-method elmo-folder-list-subfolders
   ((folder elmo-maildir-folder) &optional one-level)
   (let ((prefix (concat (elmo-folder-name-internal folder)
index d848bf8..fee7c2c 100644 (file)
 (luna-define-generic elmo-map-folder-mark-as-read (folder locations)
   "")
 
+(luna-define-generic elmo-map-folder-unmark-answered (folder locations)
+  "")
+
+(luna-define-generic elmo-map-folder-mark-as-answered (folder locations)
+  "")
+
 (luna-define-generic elmo-map-message-fetch (folder location
                                                    strategy
                                                    &optional
   ((folder elmo-map-folder) &optional nohide)
   (mapcar 'car (elmo-map-folder-location-alist-internal folder)))
 
-(luna-define-method elmo-folder-unmark-important ((folder elmo-map-folder)
-                                                 numbers)
+(luna-define-method elmo-folder-unmark-important :before ((folder
+                                                          elmo-map-folder)
+                                                         numbers)
   (elmo-map-folder-unmark-important
    folder
    (elmo-map-folder-numbers-to-locations folder numbers)))
 
-(luna-define-method elmo-folder-mark-as-important ((folder elmo-map-folder)
-                                                  numbers)
+(luna-define-method elmo-folder-mark-as-important :before ((folder
+                                                           elmo-map-folder)
+                                                          numbers)
   (elmo-map-folder-mark-as-important
    folder
    (elmo-map-folder-numbers-to-locations folder numbers)))
 
-(luna-define-method elmo-folder-unmark-read ((folder elmo-map-folder)
-                                            numbers)
+(luna-define-method elmo-folder-unmark-read :before ((folder elmo-map-folder)
+                                                    numbers)
   (elmo-map-folder-unmark-read
    folder
    (elmo-map-folder-numbers-to-locations folder numbers)))
 
-(luna-define-method elmo-folder-mark-as-read ((folder elmo-map-folder) numbers)
-  (elmo-map-folder-mark-as-read
+(luna-define-method elmo-folder-mark-as-read :before ((folder
+                                                      elmo-map-folder)
+                                                     numbers
+                                                     &optional ignore-flags)
+  (unless ignore-flags
+    (elmo-map-folder-mark-as-read
+     folder
+     (elmo-map-folder-numbers-to-locations folder numbers))))
+
+(luna-define-method elmo-folder-unmark-answered :before ((folder
+                                                         elmo-map-folder)
+                                                        numbers)
+  (elmo-map-folder-unmark-answered
+   folder
+   (elmo-map-folder-numbers-to-locations folder numbers)))
+
+(luna-define-method elmo-folder-mark-as-answered :before ((folder
+                                                         elmo-map-folder)
+                                                        numbers)
+  (elmo-map-folder-mark-as-answered
    folder
    (elmo-map-folder-numbers-to-locations folder numbers)))
 
index cc2cc44..c3116df 100644 (file)
 (luna-define-method elmo-folder-writable-p ((folder elmo-mark-folder))
   t)
 
-;;; To override elmo-map-folder methods.
-(luna-define-method elmo-folder-unmark-important ((folder elmo-mark-folder)
-                                                 numbers)
-  t)
-
-(luna-define-method elmo-folder-mark-as-important ((folder elmo-mark-folder)
-                                                  numbers)
-  t)
-
-(luna-define-method elmo-folder-unmark-read ((folder elmo-mark-folder) numbers)
-  t)
-
-(luna-define-method elmo-folder-mark-as-read ((folder elmo-mark-folder) numbers)
-  t)
-
 (require 'product)
 (product-provide (provide 'elmo-mark) (require 'elmo-version))
 
index 26149cd..3f3cb47 100644 (file)
       (setq msg-list (cdr msg-list)))
     ret-val))
 
-(luna-define-method elmo-folder-mark-as-important :around ((folder
+(luna-define-method elmo-folder-mark-as-important :before ((folder
                                                            elmo-multi-folder)
                                                           numbers)
   (dolist (folder-numbers (elmo-multi-make-folder-numbers-list folder numbers))
     (elmo-folder-mark-as-important (car folder-numbers)
-                                  (cdr folder-numbers)))
-  (luna-call-next-method))
+                                  (cdr folder-numbers))))
 
-(luna-define-method elmo-folder-unmark-important :around ((folder
+(luna-define-method elmo-folder-unmark-important :before ((folder
                                                           elmo-multi-folder)
                                                          numbers)
   (dolist (folder-numbers (elmo-multi-make-folder-numbers-list folder numbers))
     (elmo-folder-unmark-important (car folder-numbers)
-                                 (cdr folder-numbers)))
-  (luna-call-next-method))
+                                 (cdr folder-numbers))))
 
-(luna-define-method elmo-folder-mark-as-read :around ((folder
+(luna-define-method elmo-folder-mark-as-read :before ((folder
                                                       elmo-multi-folder)
-                                                     numbers)
+                                                     numbers
+                                                     &optional ignore-flag)
   (dolist (folder-numbers (elmo-multi-make-folder-numbers-list folder numbers))
     (elmo-folder-mark-as-read (car folder-numbers)
-                             (cdr folder-numbers)))
-  (luna-call-next-method))
+                             (cdr folder-numbers)
+                             ignore-flag)))
 
-(luna-define-method elmo-folder-unmark-read :around ((folder
+(luna-define-method elmo-folder-unmark-read :before ((folder
                                                      elmo-multi-folder)
                                                     numbers)
   (dolist (folder-numbers (elmo-multi-make-folder-numbers-list folder numbers))
     (elmo-folder-unmark-read (car folder-numbers)
-                            (cdr folder-numbers)))
-  (luna-call-next-method))
+                            (cdr folder-numbers))))
 
-(luna-define-method elmo-folder-mark-as-answered :around ((folder
+(luna-define-method elmo-folder-mark-as-answered :before ((folder
                                                           elmo-multi-folder)
                                                          numbers)
   (dolist (folder-numbers (elmo-multi-make-folder-numbers-list folder numbers))
     (elmo-folder-mark-as-answered (car folder-numbers)
-                                 (cdr folder-numbers)))
-  (luna-call-next-method))
+                                 (cdr folder-numbers))))
 
-(luna-define-method elmo-folder-unmark-answered :around ((folder
+(luna-define-method elmo-folder-unmark-answered :before ((folder
                                                          elmo-multi-folder)
                                                         numbers)
   (dolist (folder-numbers (elmo-multi-make-folder-numbers-list folder numbers))
     (elmo-folder-unmark-answered (car folder-numbers)
-                                (cdr folder-numbers)))
-  (luna-call-next-method))
+                                (cdr folder-numbers))))
 
 (require 'product)
 (product-provide (provide 'elmo-multi) (require 'elmo-version))
index 966b3c6..e7a9a4b 100644 (file)
@@ -455,66 +455,62 @@ Returned value is searched from `elmo-network-stream-type-alist'."
                             (mapcar 'abs numbers)
                             seen-list)))
 
-(luna-define-method elmo-folder-unmark-important :around ((folder
+(luna-define-method elmo-folder-unmark-important :before ((folder
                                                           elmo-net-folder)
                                                          numbers)
-  (if (elmo-folder-use-flag-p folder)
-      (if (elmo-folder-plugged-p folder)
-         (elmo-folder-send folder 'elmo-folder-unmark-important-plugged
-                           numbers)
-       (elmo-folder-send folder
-                         'elmo-folder-unmark-important-unplugged numbers))
-    (luna-call-next-method)))
-
-(luna-define-method elmo-folder-mark-as-important :around ((folder
+  (when (elmo-folder-use-flag-p folder)
+    (if (elmo-folder-plugged-p folder)
+       (elmo-folder-send folder 'elmo-folder-unmark-important-plugged
+                         numbers)
+      (elmo-folder-send folder
+                       'elmo-folder-unmark-important-unplugged numbers))))
+
+(luna-define-method elmo-folder-mark-as-important :before ((folder
                                                            elmo-net-folder)
                                                           numbers)
-  (if (elmo-folder-use-flag-p folder)
-      (if (elmo-folder-plugged-p folder)
-         (elmo-folder-send folder 'elmo-folder-mark-as-important-plugged
-                           numbers)
-       (elmo-folder-send folder 'elmo-folder-mark-as-important-unplugged
-                         numbers))
-    (luna-call-next-method)))
-
-(luna-define-method elmo-folder-unmark-read :around ((folder elmo-net-folder)
+  (when (elmo-folder-use-flag-p folder)
+    (if (elmo-folder-plugged-p folder)
+       (elmo-folder-send folder 'elmo-folder-mark-as-important-plugged
+                         numbers)
+      (elmo-folder-send folder 'elmo-folder-mark-as-important-unplugged
+                       numbers))))
+
+(luna-define-method elmo-folder-unmark-read :before ((folder elmo-net-folder)
                                                     numbers)
-  (if (elmo-folder-use-flag-p folder)
-      (if (elmo-folder-plugged-p folder)
-         (elmo-folder-send folder 'elmo-folder-unmark-read-plugged numbers)
-       (elmo-folder-send folder 'elmo-folder-unmark-read-unplugged numbers))
-    (luna-call-next-method)))
-
-(luna-define-method elmo-folder-mark-as-read :around ((folder elmo-net-folder)
-                                                     numbers)
-  (if (elmo-folder-use-flag-p folder)
-      (if (elmo-folder-plugged-p folder)
-         (elmo-folder-send folder 'elmo-folder-mark-as-read-plugged numbers)
-       (elmo-folder-send
-        folder 'elmo-folder-mark-as-read-unplugged numbers))
-    (luna-call-next-method)))
-
-(luna-define-method elmo-folder-unmark-answered :around ((folder
+  (when (elmo-folder-use-flag-p folder)
+    (if (elmo-folder-plugged-p folder)
+       (elmo-folder-send folder 'elmo-folder-unmark-read-plugged numbers)
+      (elmo-folder-send folder 'elmo-folder-unmark-read-unplugged numbers))))
+
+(luna-define-method elmo-folder-mark-as-read :before ((folder elmo-net-folder)
+                                                     numbers
+                                                     &optional ignore-flag)
+  (when (and (elmo-folder-use-flag-p folder)
+            (not ignore-flag))
+    (if (elmo-folder-plugged-p folder)
+       (elmo-folder-send folder 'elmo-folder-mark-as-read-plugged numbers)
+      (elmo-folder-send
+       folder 'elmo-folder-mark-as-read-unplugged numbers))))
+
+(luna-define-method elmo-folder-unmark-answered :before ((folder
                                                          elmo-net-folder)
                                                         numbers)
-  (if (elmo-folder-use-flag-p folder)
-      (if (elmo-folder-plugged-p folder)
-         (elmo-folder-send folder 'elmo-folder-unmark-answered-plugged
-                           numbers)
-       (elmo-folder-send folder
-                         'elmo-folder-unmark-answered-unplugged numbers))
-    (luna-call-next-method)))
-
-(luna-define-method elmo-folder-mark-as-answered :around ((folder
+  (when (elmo-folder-use-flag-p folder)
+    (if (elmo-folder-plugged-p folder)
+       (elmo-folder-send folder 'elmo-folder-unmark-answered-plugged
+                         numbers)
+      (elmo-folder-send folder
+                       'elmo-folder-unmark-answered-unplugged numbers))))
+
+(luna-define-method elmo-folder-mark-as-answered :before ((folder
                                                           elmo-net-folder)
                                                          numbers)
-  (if (elmo-folder-use-flag-p folder)
-      (if (elmo-folder-plugged-p folder)
-         (elmo-folder-send folder 'elmo-folder-mark-as-answered-plugged
-                           numbers)
-       (elmo-folder-send folder 'elmo-folder-mark-as-answered-unplugged
-                         numbers))
-    (luna-call-next-method)))
+  (when (elmo-folder-use-flag-p folder)
+    (if (elmo-folder-plugged-p folder)
+       (elmo-folder-send folder 'elmo-folder-mark-as-answered-plugged
+                         numbers)
+      (elmo-folder-send folder 'elmo-folder-mark-as-answered-unplugged
+                       numbers))))
 
 (luna-define-method elmo-folder-mark-as-read-unplugged ((folder
                                                         elmo-net-folder)
index 5e02c1a..9990cae 100644 (file)
@@ -1516,10 +1516,11 @@ Returns a list of cons cells like (NUMBER . VALUE)"
         folder
         (delq elem (elmo-nntp-folder-temp-crosses-internal folder)))))))
 
-(luna-define-method elmo-folder-mark-as-read ((folder elmo-nntp-folder)
-                                             numbers)
-  (elmo-nntp-folder-update-crosspost-message-alist folder numbers)
-  t)
+(luna-define-method elmo-folder-mark-as-read :before ((folder
+                                                      elmo-nntp-folder)
+                                                     numbers
+                                                     &optional ignore-flags)
+  (elmo-nntp-folder-update-crosspost-message-alist folder numbers))
 
 (luna-define-method elmo-folder-process-crosspost ((folder elmo-nntp-folder)
                                                   &optional
index 05f64c0..ea42578 100644 (file)
@@ -50,7 +50,8 @@
                                       (elmo-make-folder
                                        (elmo-match-string 3 name)))
     (elmo-pipe-folder-set-copy-internal folder
-                                       (string= ":" (elmo-match-string 2 name))))
+                                       (string= ":"
+                                                (elmo-match-string 2 name))))
   folder)
 
 (luna-define-method elmo-folder-get-primitive-list ((folder elmo-pipe-folder))
    (elmo-pipe-folder-dst-internal folder) numbers start-number))
 
 (luna-define-method elmo-folder-mark-as-read ((folder elmo-pipe-folder)
-                                             numbers)
+                                             numbers &optional ignore-flag)
   (elmo-folder-mark-as-read (elmo-pipe-folder-dst-internal folder)
-                           numbers))
+                           numbers ignore-flag))
 
 (luna-define-method elmo-folder-unmark-read ((folder elmo-pipe-folder)
                                              numbers)
index cd7ca16..5d587da 100644 (file)
@@ -349,7 +349,8 @@ NUMBERS is a list of message numbers to be processed.")
 FOLDER is the ELMO folder structure.
 NUMBERS is a list of message numbers to be processed.")
 
-(luna-define-generic elmo-folder-mark-as-read (folder numbers)
+(luna-define-generic elmo-folder-mark-as-read (folder numbers
+                                                     &optional ignore-flags)
   "Mark messages as read.
 FOLDER is the ELMO folder structure.
 NUMBERS is a list of message numbers to be processed.")
@@ -1169,7 +1170,9 @@ FIELD is a symbol of the field."
                               number
                               'read))))
 
-(luna-define-method elmo-folder-mark-as-read ((folder elmo-folder) numbers)
+(luna-define-method elmo-folder-mark-as-read ((folder elmo-folder)
+                                             numbers
+                                             &optional ignore-flag)
   (when (elmo-folder-msgdb-internal folder)
     (dolist (number numbers)
       (elmo-msgdb-set-status (elmo-folder-msgdb folder)