Feedback T-gnus 6.16.
[elisp/gnus.git-] / lisp / nnml.el
index de2daa5..7b0ae9c 100644 (file)
@@ -375,7 +375,10 @@ marks file will be regenerated properly by Gnus.")
   (nnmail-check-syntax)
   (let (result)
     (when nnmail-cache-accepted-message-ids
-      (nnmail-cache-insert (nnmail-fetch-field "message-id") group))
+      (nnmail-cache-insert (nnmail-fetch-field "message-id") 
+                          group
+                          (nnmail-fetch-field "subject")
+                          (nnmail-fetch-field "from")))
     (if (stringp group)
        (and
         (nnmail-activate 'nnml)
@@ -625,8 +628,12 @@ marks file will be regenerated properly by Gnus.")
 
 (defun nnml-save-mail (group-art)
   "Called narrowed to an article."
-  (let (chars headers)
+  (let (chars headers extension)
     (setq chars (nnmail-insert-lines))
+    (setq extension
+         (and nnml-use-compressed-files
+              (> chars 1000)
+              ".gz"))
     (nnmail-insert-xref group-art)
     (run-hooks 'nnmail-prepare-save-mail-hook)
     (run-hooks 'nnml-prepare-save-mail-hook)
@@ -641,7 +648,8 @@ marks file will be regenerated properly by Gnus.")
        (nnml-possibly-create-directory (caar ga))
        (let ((file (concat (nnmail-group-pathname
                             (caar ga) nnml-directory)
-                           (int-to-string (cdar ga)))))
+                           (int-to-string (cdar ga))
+                           extension)))
          (if first
              ;; It was already saved, so we just make a hard link.
              (funcall nnmail-crosspost-link-function first file t)
@@ -893,7 +901,8 @@ Use the nov database for that directory if available."
 (defun nnml-current-group-article-to-file-alist ()
   "Return an alist of article/file pairs in the current group.
 Use the nov database for the current group if available."
-  (if (or gnus-nov-is-evil
+  (if (or nnml-use-compressed-files
+         gnus-nov-is-evil
          nnml-nov-is-evil
          (not (file-exists-p
                (expand-file-name nnml-nov-file-name