Add nnir-1.68.
[elisp/gnus.git-] / lisp / gnus-start.el
index 6df184e..85762a9 100644 (file)
@@ -414,6 +414,10 @@ Can be used to turn version control on or off."
                                          'ctext)
   "*Coding system for startup file.")
 
+(defvar gnus-ding-file-coding-system gnus-startup-file-coding-system
+  "*Coding system for ding file.")
+;; Note that the ding file for T-gnus ought not to have byte-codes.
+
 ;;; Internal variables
 
 (defvar gnus-newsrc-file-version nil)
@@ -919,10 +923,17 @@ 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
-      (setq gnus-server-alist (delq (assoc "archive" gnus-server-alist)
-                                   gnus-server-alist))
-      (push (cons "archive" gnus-message-archive-method)
-           gnus-server-alist))
+      (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)))
 
     ;; If we don't read the complete active file, we fill in the
     ;; hashtb here.
@@ -1461,18 +1472,19 @@ newsgroup."
           (quit
            (message "Quit activating %s" group)
            nil))
-        (setq active (gnus-parse-active))
-        ;; If there are no articles in the group, the GROUP
-        ;; command may have responded with the `(0 . 0)'.  We
-        ;; ignore this if we already have an active entry
-        ;; for the group.
-        (if (and (zerop (car active))
-                 (zerop (cdr active))
-                 (gnus-active group))
-            (gnus-active group)
-          (gnus-set-active group active)
-          ;; Return the new active info.
-          active))))
+        (unless dont-check
+          (setq active (gnus-parse-active))
+          ;; If there are no articles in the group, the GROUP
+          ;; command may have responded with the `(0 . 0)'.  We
+          ;; ignore this if we already have an active entry
+          ;; for the group.
+          (if (and (zerop (car active))
+                   (zerop (cdr active))
+                   (gnus-active group))
+              (gnus-active group)
+            (gnus-set-active group active)
+            ;; Return the new active info.
+            active)))))
 
 (defun gnus-get-unread-articles-in-group (info active &optional update)
   (when active
@@ -2065,7 +2077,7 @@ If FORCE is non-nil, the .newsrc file is read."
          (condition-case nil
              (progn
                (insert-file-contents-as-coding-system
-                gnus-startup-file-coding-system ding-file)
+                gnus-ding-file-coding-system ding-file)
                (eval-region (point-min) (point-max)))
            (error
             (ding)
@@ -2494,7 +2506,7 @@ The backup file \".newsrc.eld_\" will be created before re-reading."
          (gnus-message 5 "Saving %s.eld..." gnus-current-startup-file)
          (gnus-gnus-to-quick-newsrc-format)
          (gnus-run-hooks 'gnus-save-quick-newsrc-hook)
-         (save-buffer-as-coding-system gnus-startup-file-coding-system)
+         (save-buffer-as-coding-system gnus-ding-file-coding-system)
          (kill-buffer (current-buffer))
          (gnus-message
           5 "Saving %s.eld...done" gnus-current-startup-file))
@@ -2700,8 +2712,8 @@ The backup file \".newsrc.eld_\" will be created before re-reading."
           (make-temp-name (concat gnus-current-startup-file "-slave-")))
          (modes (ignore-errors
                   (file-modes (concat gnus-current-startup-file ".eld")))))
-      (gnus-write-buffer-as-coding-system
-       gnus-startup-file-coding-system slave-name)
+      (gnus-write-buffer-as-coding-system gnus-ding-file-coding-system
+                                         slave-name)
       (when modes
        (set-file-modes slave-name modes)))))