X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-start.el;h=ba23c7cc32c400969308edcfbd4d1304ce1db020;hb=e405b22c6b46721607c5e6c712a4705c23dee751;hp=a808d5a440b841a5ad5a0770ede59c7a769d5ed5;hpb=8c43195e8cb770dd9bf7448a5dd016701450a18a;p=gnus diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index a808d5a44..ba23c7cc3 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -37,7 +37,7 @@ (autoload 'gnus-agent-save-local "gnus-agent") (autoload 'gnus-agent-possibly-alter-active "gnus-agent") -(eval-when-compile +(eval-when-compile (require 'cl) (defvar gnus-agent-covered-methods nil) @@ -54,7 +54,7 @@ "Whether to create backup files. This variable takes the same values as the `version-control' variable." - :version "21.4" + :version "22.1" :group 'gnus-start :type '(choice (const :tag "Never" never) (const :tag "If existing" nil) @@ -65,7 +65,7 @@ variable." the buffer or write directly to the file. The buffer is faster because all of the contents are written at once. The direct write uses considerably less memory." - :version "21.4" + :version "22.1" :group 'gnus-start :type '(choice (const :tag "Write via buffer" t) (const :tag "Write directly to file" nil))) @@ -299,7 +299,7 @@ claim them." (defcustom gnus-subscribe-newsgroup-hooks nil "*Hooks run after you subscribe to a new group. The hooks will be called with new group's name as argument." - :version "21.4" + :version "22.1" :group 'gnus-group-new :type 'hook) @@ -406,7 +406,7 @@ This hook is called as the first thing when Gnus is started." (defcustom gnus-get-top-new-news-hook nil "A hook run just before Gnus checks for new news globally." - :version "21.4" + :version "22.1" :group 'gnus-group-new :type 'hook) @@ -952,16 +952,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. @@ -1910,7 +1922,7 @@ If SCAN, request a scan of that group as well." (setcdr range (1- article)) (setq modified t) ranges)))))))) - + (when modified (when (eq modified 'remove-null) (setq r (delq nil r))) @@ -2309,7 +2321,7 @@ If FORCE is non-nil, the .newsrc file is read." t))))) (funcall func convert-to))) - (gnus-dribble-enter + (gnus-dribble-enter (format ";Converted gnus from version '%s' to '%s'." gnus-newsrc-file-version gnus-version)))))))