* elmo.el (elmo-folder-unmark-important): Added optional argument
authorteranisi <teranisi>
Mon, 24 Mar 2003 04:48:40 +0000 (04:48 +0000)
committerteranisi <teranisi>
Mon, 24 Mar 2003 04:48:40 +0000 (04:48 +0000)
 `ignore-flag'. (All related portions are changed.)

elmo/ChangeLog
elmo/elmo-filter.el
elmo/elmo-map.el
elmo/elmo-multi.el
elmo/elmo-net.el
elmo/elmo-pipe.el
elmo/elmo.el

index 01e7161..457ee32 100644 (file)
@@ -1,6 +1,8 @@
 2003-03-24  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * elmo.el (elmo-message-set-mark): Abolish.
+       (elmo-folder-unmark-important): Added optional argument `ignore-flag'.
+       (All related portions are changed.)
 
        * elmo-msgdb.el (toplevel): Added comment.
        (elmo-load-msgdb): Added 4th element `path'.
index 822e13a..1e4c7a1 100644 (file)
 
 (luna-define-method elmo-folder-mark-as-important :around ((folder
                                                            elmo-filter-folder)
-                                                          numbers)
+                                                          numbers
+                                                          &optional
+                                                          ignore-flag)
   (elmo-folder-mark-as-important (elmo-filter-folder-target-internal folder)
-                                numbers)
+                                numbers ignore-flag)
     (luna-call-next-method))
 
 (luna-define-method elmo-folder-unmark-important :around ((folder
                                                           elmo-filter-folder)
-                                                         numbers)
+                                                         numbers
+                                                         &optional
+                                                         ignore-flag)
   (elmo-folder-unmark-important (elmo-filter-folder-target-internal folder)
-                               numbers)
+                               numbers ignore-flag)
   (luna-call-next-method))
 
 (luna-define-method elmo-folder-mark-as-answered :around ((folder
index eaac9b7..2657ea5 100644 (file)
 
 (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)))
+                                                         numbers
+                                                         &optional
+                                                         ignore-flags)
+  (unless ignore-flags
+    (elmo-map-folder-unmark-important
+     folder
+     (elmo-map-folder-numbers-to-locations 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)))
+                                                          numbers
+                                                          &optional
+                                                          ignore-flags)
+  (unless ignore-flags
+    (elmo-map-folder-mark-as-important
+     folder
+     (elmo-map-folder-numbers-to-locations folder numbers))))
 
 (luna-define-method elmo-folder-unmark-read :before ((folder elmo-map-folder)
                                                     numbers
index 5be1400..31f7573 100644 (file)
 
 (luna-define-method elmo-folder-mark-as-important :before ((folder
                                                            elmo-multi-folder)
-                                                          numbers)
+                                                          numbers
+                                                          &optional
+                                                          ignore-flags)
   (dolist (folder-numbers (elmo-multi-make-folder-numbers-list folder numbers))
     (elmo-folder-mark-as-important (car folder-numbers)
-                                  (cdr folder-numbers))))
+                                  (cdr folder-numbers)
+                                  ignore-flags)))
 
 (luna-define-method elmo-folder-unmark-important :before ((folder
                                                           elmo-multi-folder)
-                                                         numbers)
+                                                         numbers
+                                                         &optional
+                                                         ignore-flags)
   (dolist (folder-numbers (elmo-multi-make-folder-numbers-list folder numbers))
     (elmo-folder-unmark-important (car folder-numbers)
-                                 (cdr folder-numbers))))
+                                 (cdr folder-numbers)
+                                 ignore-flags)))
 
 (luna-define-method elmo-folder-mark-as-read :before ((folder
                                                       elmo-multi-folder)
index 34e1143..22d40f6 100644 (file)
@@ -457,8 +457,11 @@ Returned value is searched from `elmo-network-stream-type-alist'."
 
 (luna-define-method elmo-folder-unmark-important :before ((folder
                                                           elmo-net-folder)
-                                                         numbers)
-  (when (elmo-folder-use-flag-p 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-unmark-important-plugged
                          numbers)
@@ -467,8 +470,11 @@ Returned value is searched from `elmo-network-stream-type-alist'."
 
 (luna-define-method elmo-folder-mark-as-important :before ((folder
                                                            elmo-net-folder)
-                                                          numbers)
-  (when (elmo-folder-use-flag-p 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-important-plugged
                          numbers)
index 2797298..eb48a3e 100644 (file)
                           numbers ignore-flag))
 
 (luna-define-method elmo-folder-unmark-important ((folder elmo-pipe-folder)
-                                                 numbers)
+                                                 numbers
+                                                 &optional ignore-flag)
   (elmo-folder-unmark-important (elmo-pipe-folder-dst-internal folder)
-                               numbers))
+                               numbers ignore-flag))
 
 (luna-define-method elmo-folder-mark-as-important ((folder elmo-pipe-folder)
-                                                  numbers)
+                                                  numbers
+                                                  &optional ignore-flag)
   (elmo-folder-mark-as-important (elmo-pipe-folder-dst-internal folder)
-                                numbers))
+                                numbers ignore-flag))
 
 (luna-define-method elmo-folder-pack-numbers ((folder elmo-pipe-folder))
   (elmo-folder-pack-numbers (elmo-pipe-folder-dst-internal folder)))
index 048b677..3a99fb0 100644 (file)
@@ -339,15 +339,21 @@ FOLDER is the ELMO folder structure.
 NUMBERS is a list of message numbers to create msgdb.
 ID-MARK-TABLE is a hashtable of message-id and its status mark.")
 
-(luna-define-generic elmo-folder-unmark-important (folder numbers)
+(luna-define-generic elmo-folder-unmark-important (folder
+                                                  numbers
+                                                  &optional ignore-flags)
   "Un-mark messages as important.
 FOLDER is the ELMO folder structure.
-NUMBERS is a list of message numbers to be processed.")
+NUMBERS is a list of message numbers to be processed.
+If IGNORE-FLAGS is non-nil, folder flags are not updated.")
 
-(luna-define-generic elmo-folder-mark-as-important (folder numbers)
+(luna-define-generic elmo-folder-mark-as-important (folder 
+                                                   numbers
+                                                   &optional ignore-flags)
   "Mark messages as important.
 FOLDER is the ELMO folder structure.
-NUMBERS is a list of message numbers to be processed.")
+NUMBERS is a list of message numbers to be processed.
+If IGNORE-FLAGS is non-nil, folder flags are not updated.")
 
 (luna-define-generic elmo-folder-unmark-read (folder numbers
                                                     &optional ignore-flags)
@@ -1184,7 +1190,8 @@ FIELD is a symbol of the field."
   folder) ; default is folder
 
 (luna-define-method elmo-folder-unmark-important ((folder elmo-folder)
-                                                 numbers)
+                                                 numbers
+                                                 &optional ignore-flags)
   (when (elmo-folder-msgdb-internal folder)
     (dolist (number numbers)
       (elmo-msgdb-unset-flag (elmo-folder-msgdb folder)
@@ -1193,7 +1200,8 @@ FIELD is a symbol of the field."
                             'important))))
 
 (luna-define-method elmo-folder-mark-as-important ((folder elmo-folder)
-                                                  numbers)
+                                                  numbers
+                                                  &optional ignore-flags)
   (when (elmo-folder-msgdb-internal folder)
     (dolist (number numbers)
       (elmo-msgdb-set-flag (elmo-folder-msgdb folder)