* elmo.el (elmo-generic-folder-diff): Avoid byte-compile warning.
[elisp/wanderlust.git] / elmo / elmo.el
index 2047f62..f729de6 100644 (file)
@@ -344,16 +344,19 @@ 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-unmark-read (folder numbers)
+(luna-define-generic elmo-folder-unmark-read (folder numbers
+                                                    &optional ignore-flags)
   "Un-mark messages as read.
 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-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.")
+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-answered (folder numbers)
   "Un-mark messages as answered.
@@ -949,14 +952,11 @@ Return a cons cell of (NUMBER-CROSSPOSTS . NEW-MARK-ALIST).")
                                  0))
              (elmo-folder-set-info-hashtb folder in-db-max nil))
          (setq in-db-max cached-in-db-max)))
-      (setq unsync (if (and in-db
-                           (car in-folder))
+      (setq unsync (if (and in-db (car in-folder))
                       (- (car in-folder) in-db-max)
-                    (if (and in-folder
-                             (null in-db))
+                    (if (and in-folder (null in-db))
                         (cdr in-folder)
-                      (if (null (car in-folder))
-                          nil))))
+                      (car in-folder))))
       (setq messages (cdr in-folder))
       (if (and unsync messages (> unsync messages))
          (setq unsync messages))
@@ -1114,8 +1114,10 @@ Return a cons cell of (NUMBER-CROSSPOSTS . NEW-MARK-ALIST).")
 FOLDER is the ELMO folder structure.
 NUMBER is a number of the message.
 If CACHED is t, message mark is set as cached."
-  (elmo-msgdb-set-cached 
-   (elmo-folder-msgdb folder) number cached))
+  (when (elmo-msgdb-set-cached
+        (elmo-folder-msgdb folder) number cached)
+    (elmo-folder-set-mark-modified-internal folder t)))
+
 
 (defun elmo-message-mark (folder number)
   "Get mark of the message.
@@ -1170,7 +1172,9 @@ FIELD is a symbol of the field."
                             number
                             'important))))
 
-(luna-define-method elmo-folder-unmark-read ((folder elmo-folder) numbers)
+(luna-define-method elmo-folder-unmark-read ((folder elmo-folder)
+                                            numbers
+                                            &optional ignore-flags)
   (when (elmo-folder-msgdb-internal folder)
     (dolist (number numbers)
       (elmo-msgdb-unset-status (elmo-folder-msgdb folder)
@@ -1596,6 +1600,7 @@ Return a hashtable for newsgroups."
 
 ;; autoloads
 (autoload 'elmo-dop-queue-flush "elmo-dop")
+(autoload 'elmo-nntp-post "elmo-nntp")
 
 (require 'product)
 (product-provide (provide 'elmo) (require 'elmo-version))