*** empty log message ***
[gnus] / lisp / gnus-start.el
index 8ec7c5b..974936e 100644 (file)
 (eval-when-compile (require 'cl))
 
 (defcustom gnus-startup-file (nnheader-concat gnus-home-directory ".newsrc")
 (eval-when-compile (require 'cl))
 
 (defcustom gnus-startup-file (nnheader-concat gnus-home-directory ".newsrc")
-  "*Your `.newsrc' file.
+  "Your `.newsrc' file.
 `.newsrc-SERVER' will be used instead if that exists."
   :group 'gnus-start
   :type 'file)
 
 (defcustom gnus-init-file (nnheader-concat gnus-home-directory ".gnus")
 `.newsrc-SERVER' will be used instead if that exists."
   :group 'gnus-start
   :type 'file)
 
 (defcustom gnus-init-file (nnheader-concat gnus-home-directory ".gnus")
-  "*Your Gnus Emacs-Lisp startup file name.
+  "Your Gnus Emacs-Lisp startup file name.
 If a file with the `.el' or `.elc' suffixes exists, it will be read instead."
   :group 'gnus-start
   :type 'file)
 If a file with the `.el' or `.elc' suffixes exists, it will be read instead."
   :group 'gnus-start
   :type 'file)
@@ -58,7 +58,7 @@ If a file with the `.el' or `.elc' suffixes exists, it will be read instead."
   :type '(choice file (const nil)))
 
 (defcustom gnus-default-subscribed-newsgroups nil
   :type '(choice file (const nil)))
 
 (defcustom gnus-default-subscribed-newsgroups nil
-  "*List of newsgroups to subscribe, when a user runs Gnus the first time.
+  "List of newsgroups to subscribe, when a user runs Gnus the first time.
 The value should be a list of strings.
 If it is t, Gnus will not do anything special the first time it is
 started; it'll just use the normal newsgroups subscription methods."
 The value should be a list of strings.
 If it is t, Gnus will not do anything special the first time it is
 started; it'll just use the normal newsgroups subscription methods."
@@ -80,18 +80,18 @@ saved will be used."
   :type '(choice directory (const nil)))
 
 (defcustom gnus-check-new-newsgroups 'ask-server
   :type '(choice directory (const nil)))
 
 (defcustom gnus-check-new-newsgroups 'ask-server
-  "*Non-nil means that Gnus will run gnus-find-new-newsgroups at startup.
+  "*Non-nil means that Gnus will run `gnus-find-new-newsgroups' at startup.
 This normally finds new newsgroups by comparing the active groups the
 servers have already reported with those Gnus already knows, either alive
 or killed.
 
 This normally finds new newsgroups by comparing the active groups the
 servers have already reported with those Gnus already knows, either alive
 or killed.
 
-When any of the following are true, gnus-find-new-newsgroups will instead
+When any of the following are true, `gnus-find-new-newsgroups' will instead
 ask the servers (primary, secondary, and archive servers) to list new
 groups since the last time it checked:
   1. This variable is `ask-server'.
   2. This variable is a list of select methods (see below).
   3. `gnus-read-active-file' is nil or `some'.
 ask the servers (primary, secondary, and archive servers) to list new
 groups since the last time it checked:
   1. This variable is `ask-server'.
   2. This variable is a list of select methods (see below).
   3. `gnus-read-active-file' is nil or `some'.
-  4. A prefix argument is given to gnus-find-new-newsgroups interactively.
+  4. A prefix argument is given to `gnus-find-new-newsgroups' interactively.
 
 Thus, if this variable is `ask-server' or a list of select methods or
 `gnus-read-active-file' is nil or `some', then the killed list is no
 
 Thus, if this variable is `ask-server' or a list of select methods or
 `gnus-read-active-file' is nil or `some', then the killed list is no
@@ -289,7 +289,7 @@ hierarchy in its entirety."
   :type 'boolean)
 
 (defcustom gnus-auto-subscribed-groups
   :type 'boolean)
 
 (defcustom gnus-auto-subscribed-groups
-  "^nnml\\|^nnfolder\\|^nnmbox\\|^nnmh\\|^nnbabyl"
+  "nnml\\|^nnfolder\\|^nnmbox\\|^nnmh\\|^nnbabyl"
   "*All new groups that match this regexp will be subscribed automatically.
 Note that this variable only deals with new groups.  It has no effect
 whatsoever on old groups.
   "*All new groups that match this regexp will be subscribed automatically.
 Note that this variable only deals with new groups.  It has no effect
 whatsoever on old groups.
@@ -328,34 +328,34 @@ disc."
   :type 'boolean)
 
 (defcustom gnus-check-bogus-groups-hook nil
   :type 'boolean)
 
 (defcustom gnus-check-bogus-groups-hook nil
-  "*A hook run after removing bogus groups."
+  "A hook run after removing bogus groups."
   :group 'gnus-start-server
   :type 'hook)
 
 (defcustom gnus-startup-hook nil
   :group 'gnus-start-server
   :type 'hook)
 
 (defcustom gnus-startup-hook nil
-  "*A hook called at startup.
+  "A hook called at startup.
 This hook is called after Gnus is connected to the NNTP server."
   :group 'gnus-start
   :type 'hook)
 
 (defcustom gnus-before-startup-hook nil
 This hook is called after Gnus is connected to the NNTP server."
   :group 'gnus-start
   :type 'hook)
 
 (defcustom gnus-before-startup-hook nil
-  "*A hook called at before startup.
+  "A hook called at before startup.
 This hook is called as the first thing when Gnus is started."
   :group 'gnus-start
   :type 'hook)
 
 (defcustom gnus-started-hook nil
 This hook is called as the first thing when Gnus is started."
   :group 'gnus-start
   :type 'hook)
 
 (defcustom gnus-started-hook nil
-  "*A hook called as the last thing after startup."
+  "A hook called as the last thing after startup."
   :group 'gnus-start
   :type 'hook)
 
 (defcustom gnus-setup-news-hook nil
   :group 'gnus-start
   :type 'hook)
 
 (defcustom gnus-setup-news-hook nil
-  "*A hook after reading the .newsrc file, but before generating the buffer."
+  "A hook after reading the .newsrc file, but before generating the buffer."
   :group 'gnus-start
   :type 'hook)
 
 (defcustom gnus-get-new-news-hook nil
   :group 'gnus-start
   :type 'hook)
 
 (defcustom gnus-get-new-news-hook nil
-  "*A hook run just before Gnus checks for new news."
+  "A hook run just before Gnus checks for new news."
   :group 'gnus-group-new
   :type 'hook)
 
   :group 'gnus-group-new
   :type 'hook)
 
@@ -367,18 +367,18 @@ This hook is called as the first thing when Gnus is started."
   :type 'hook)
 
 (defcustom gnus-save-newsrc-hook nil
   :type 'hook)
 
 (defcustom gnus-save-newsrc-hook nil
-  "*A hook called before saving any of the newsrc files."
+  "A hook called before saving any of the newsrc files."
   :group 'gnus-newsrc
   :type 'hook)
 
 (defcustom gnus-save-quick-newsrc-hook nil
   :group 'gnus-newsrc
   :type 'hook)
 
 (defcustom gnus-save-quick-newsrc-hook nil
-  "*A hook called just before saving the quick newsrc file.
+  "A hook called just before saving the quick newsrc file.
 Can be used to turn version control on or off."
   :group 'gnus-newsrc
   :type 'hook)
 
 (defcustom gnus-save-standard-newsrc-hook nil
 Can be used to turn version control on or off."
   :group 'gnus-newsrc
   :type 'hook)
 
 (defcustom gnus-save-standard-newsrc-hook nil
-  "*A hook called just before saving the standard newsrc file.
+  "A hook called just before saving the standard newsrc file.
 Can be used to turn version control on or off."
   :group 'gnus-newsrc
   :type 'hook)
 Can be used to turn version control on or off."
   :group 'gnus-newsrc
   :type 'hook)
@@ -608,7 +608,8 @@ the first newsgroup."
        gnus-newsgroup-data nil
        gnus-newsgroup-unreads nil
        nnoo-state-alist nil
        gnus-newsgroup-data nil
        gnus-newsgroup-unreads nil
        nnoo-state-alist nil
-       gnus-current-select-method nil)
+       gnus-current-select-method nil
+       gnus-ephemeral-servers nil)
   (gnus-shutdown 'gnus)
   ;; Kill the startup file.
   (and gnus-current-startup-file
   (gnus-shutdown 'gnus)
   ;; Kill the startup file.
   (and gnus-current-startup-file
@@ -758,6 +759,9 @@ prompt the user for the name of an NNTP server to use."
       (insert string "\n")
       (set-window-point (get-buffer-window (current-buffer)) (point-max))
       (bury-buffer gnus-dribble-buffer)
       (insert string "\n")
       (set-window-point (get-buffer-window (current-buffer)) (point-max))
       (bury-buffer gnus-dribble-buffer)
+      (save-excursion
+       (set-buffer gnus-group-buffer)
+       (gnus-group-set-mode-line))
       (set-buffer obuf))))
 
 (defun gnus-dribble-touch ()
       (set-buffer obuf))))
 
 (defun gnus-dribble-touch ()
@@ -905,7 +909,8 @@ If LEVEL is non-nil, the news will be set up at level LEVEL."
     ;; Find new newsgroups and treat them.
     (when (and init gnus-check-new-newsgroups (not level)
               (gnus-check-server gnus-select-method)
     ;; Find new newsgroups and treat them.
     (when (and init gnus-check-new-newsgroups (not level)
               (gnus-check-server gnus-select-method)
-              (not gnus-slave))
+              (not gnus-slave)
+              gnus-plugged)
       (gnus-find-new-newsgroups))
 
     ;; We might read in new NoCeM messages here.
       (gnus-find-new-newsgroups))
 
     ;; We might read in new NoCeM messages here.
@@ -1024,6 +1029,8 @@ for new groups."
         (new-date (current-time-string))
         group new-newsgroups got-new method hashtb
         gnus-override-subscribe-method)
         (new-date (current-time-string))
         group new-newsgroups got-new method hashtb
         gnus-override-subscribe-method)
+    (unless gnus-killed-hashtb
+      (gnus-make-hashtable-from-killed))
     ;; Go through both primary and secondary select methods and
     ;; request new newsgroups.
     (while (setq method (gnus-server-get-method nil (pop methods)))
     ;; Go through both primary and secondary select methods and
     ;; request new newsgroups.
     (while (setq method (gnus-server-get-method nil (pop methods)))
@@ -1069,9 +1076,10 @@ for new groups."
         hashtb))
       (when new-newsgroups
        (gnus-subscribe-hierarchical-interactive new-newsgroups)))
         hashtb))
       (when new-newsgroups
        (gnus-subscribe-hierarchical-interactive new-newsgroups)))
-    (when (> groups 0)
-      (gnus-message 6 "%d new newsgroup%s arrived."
-                   groups (if (> groups 1) "s have" " has")))
+     (if (> groups 0)
+        (gnus-message 5 "%d new newsgroup%s arrived"
+                      groups (if (> groups 1) "s have" " has"))
+       (gnus-message 5 "No new newsgroups"))
     (when got-new
       (setq gnus-newsrc-last-checked-date new-date))
     got-new))
     (when got-new
       (setq gnus-newsrc-last-checked-date new-date))
     got-new))