From d22e2a8314a44d232610524b40a962ee65e53266 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 13 Dec 2004 03:37:01 +0000 Subject: [PATCH] Synch to No Gnus 200412130336. --- lisp/ChangeLog | 6 ++++++ lisp/gnus-start.el | 32 ++++++++++++++++++++++---------- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 953fb19..b8ec8fe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-12-13 Katsumi Yamaoka + + * gnus-start.el (gnus-setup-news): Honor user's setting to + gnus-message-archive-method. Suggested by Lute Kamstra + . + 2004-12-10 Arnaud Giersch (tiny change) * gnus-sum.el (gnus-summary-exit-no-update): Don't clear the diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index c22c143..da849d5 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -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. -- 1.7.10.4