*** empty log message ***
[gnus] / lisp / gnus-start.el
index 5d818ac..b2418d9 100644 (file)
@@ -1,7 +1,7 @@
 ;;; gnus-start.el --- startup functions for Gnus
 ;; Copyright (C) 1996,97,98 Free Software Foundation, Inc.
 
-;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
 
 ;; This file is part of GNU Emacs.
@@ -383,10 +383,15 @@ Can be used to turn version control on or off."
   :group 'gnus-newsrc
   :type 'hook)
 
-;;; Internal variables
+(defcustom gnus-always-read-dribble-file nil
+  "Uncoditionally read the dribble file."
+  :group 'gnus-newsrc
+  :type 'boolean)
 
-(defvar gnus-always-read-dribble-file nil
-  "Uncoditionally read the dribble file.")
+(defvar gnus-startup-file-coding-system 'binary
+  "*Coding system for startup file.")
+
+;;; Internal variables
 
 (defvar gnus-newsrc-file-version nil)
 (defvar gnus-override-subscribe-method nil)
@@ -424,7 +429,9 @@ Can be used to turn version control on or off."
                   (file-exists-p (concat file ".el"))
                   (file-exists-p (concat file ".elc")))
               (condition-case var
-                  (load file nil t)
+                  (let ((coding-system-for-read
+                         gnus-startup-file-coding-system))
+                    (load file nil t))
                 (error
                  (error "Error in %s: %s" file var)))))))))
 
@@ -935,13 +942,25 @@ If LEVEL is non-nil, the news will be set up at level LEVEL."
   "Search for new newsgroups and add them.
 Each new newsgroup will be treated with `gnus-subscribe-newsgroup-method.'
 The `-n' option line from .newsrc is respected.
-If ARG (the prefix), use the `ask-server' method to query the server
-for new groups."
-  (interactive "P")
-  (let ((check (if (or (and arg (not (listp gnus-check-new-newsgroups)))
-                      (null gnus-read-active-file)
-                      (eq gnus-read-active-file 'some))
-                  'ask-server gnus-check-new-newsgroups)))
+
+With 1 C-u, use the `ask-server' method to query the server for new
+groups.
+With 2 C-u's, use most complete method possible to query the server
+for new groups, and subscribe the new groups as zombies."
+  (interactive "p")
+  (let* ((gnus-subscribe-newsgroup-method
+         gnus-subscribe-newsgroup-method)
+        (check (cond
+               ((or (and (= (or arg 1) 4)
+                         (not (listp gnus-check-new-newsgroups)))
+                    (null gnus-read-active-file)
+                    (eq gnus-read-active-file 'some))
+                'ask-server)
+               ((= (or arg 1) 16)
+                (setq gnus-subscribe-newsgroup-method
+                      'gnus-subscribe-zombies)
+                t)
+               (t gnus-check-new-newsgroups))))
     (unless (gnus-check-first-time-used)
       (if (or (consp check)
              (eq check 'ask-server))
@@ -1484,7 +1503,7 @@ newsgroup."
          (when (<= (gnus-info-level info) foreign-level)
            (setq active (gnus-activate-group group 'scan))
            ;; Let the Gnus agent save the active file.
-           (when (and gnus-agent gnus-plugged)
+           (when (and gnus-agent gnus-plugged active)
              (gnus-agent-save-group-info
               method (gnus-group-real-name group) active))
            (unless (inline (gnus-virtual-group-p group))
@@ -1897,7 +1916,8 @@ If FORCE is non-nil, the .newsrc file is read."
     (gnus-message 5 "Reading %s..." ding-file)
     (let (gnus-newsrc-assoc)
       (condition-case nil
-         (load ding-file t t t)
+         (let ((coding-system-for-read gnus-startup-file-coding-system))
+           (load ding-file t t t))
        (error
         (ding)
         (unless (gnus-yes-or-no-p