Synch to No Gnus 200412130336.
authoryamaoka <yamaoka>
Mon, 13 Dec 2004 03:37:01 +0000 (03:37 +0000)
committeryamaoka <yamaoka>
Mon, 13 Dec 2004 03:37:01 +0000 (03:37 +0000)
lisp/ChangeLog
lisp/gnus-start.el

index 953fb19..b8ec8fe 100644 (file)
@@ -1,3 +1,9 @@
+2004-12-13  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-start.el (gnus-setup-news): Honor user's setting to
+       gnus-message-archive-method.  Suggested by Lute Kamstra
+       <Lute.Kamstra@xs4all.nl>.
+
 2004-12-10  Arnaud Giersch  <arnaud.giersch@free.fr>  (tiny change)
 
        * gnus-sum.el (gnus-summary-exit-no-update): Don't clear the
index c22c143..da849d5 100644 (file)
@@ -973,16 +973,28 @@ If LEVEL is non-nil, the news will be set up at level LEVEL."
     ;; Make sure the archive server is available to all and sundry.
     (when gnus-message-archive-method
       (unless (assoc "archive" gnus-server-alist)
-       (push `("archive"
-               nnfolder
-               "archive"
-               (nnfolder-directory
-                ,(nnheader-concat message-directory "archive"))
-               (nnfolder-active-file
-                ,(nnheader-concat message-directory "archive/active"))
-               (nnfolder-get-new-mail nil)
-               (nnfolder-inhibit-expiry t))
-             gnus-server-alist)))
+       (let ((method (or (and (stringp gnus-message-archive-method)
+                              (gnus-server-to-method
+                               gnus-message-archive-method))
+                         gnus-message-archive-method)))
+         ;; Check whether the archive method is writable.
+         (unless (or (stringp method)
+                     (memq 'respool (assoc (format "%s" (car method))
+                                           gnus-valid-select-methods)))
+           (setq method "archive")) ;; The default.
+         (push (if (stringp method)
+                   `("archive"
+                     nnfolder
+                     ,method
+                     (nnfolder-directory
+                      ,(nnheader-concat message-directory method))
+                     (nnfolder-active-file
+                      ,(nnheader-concat message-directory
+                                        (concat method "/active")))
+                     (nnfolder-get-new-mail nil)
+                     (nnfolder-inhibit-expiry t))
+                 (cons "archive" method))
+               gnus-server-alist))))
 
     ;; If we don't read the complete active file, we fill in the
     ;; hashtb here.