T-gnus 6.16.4 revision 00.
[elisp/gnus.git-] / lisp / nnml.el
index 9657e78..7b0ae9c 100644 (file)
@@ -628,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)
@@ -644,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)