*** empty log message ***
[gnus] / lisp / gnus-start.el
index a34d7c8..95a31db 100644 (file)
@@ -235,7 +235,7 @@ not match this regexp will be removed before saving the list."
  (mapconcat 'identity
            '("^to\\."                  ; not "real" groups
              "^[0-9. \t]+ "            ; all digits in name
-             "[][\"#'()]"              ; bogus characters
+             "^[\"][]\"[#'()]"         ; bogus characters
              )
            "\\|")
   "*A regexp to match uninteresting newsgroups in the active file.
@@ -253,7 +253,9 @@ inserts new groups at the beginning of the list of groups;
 alphabetic order; `gnus-subscribe-hierarchically' inserts new groups
 in hierarchical newsgroup order; `gnus-subscribe-interactively' asks
 for your decision; `gnus-subscribe-killed' kills all new groups;
-`gnus-subscribe-zombies' will make all new groups into zombies."
+`gnus-subscribe-zombies' will make all new groups into zombies;
+`gnus-subscribe-topics' will enter groups into the topics that
+claim them."
   :group 'gnus-group-new
   :type '(radio (function-item gnus-subscribe-randomly)
                (function-item gnus-subscribe-alphabetically)
@@ -261,6 +263,7 @@ for your decision; `gnus-subscribe-killed' kills all new groups;
                (function-item gnus-subscribe-interactively)
                (function-item gnus-subscribe-killed)
                (function-item gnus-subscribe-zombies)
+               (function-item gnus-subscribe-topics)
                function))
 
 (defcustom gnus-subscribe-options-newsgroup-method
@@ -369,7 +372,7 @@ This hook is called as the first thing when Gnus is started."
 (defcustom gnus-after-getting-new-news-hook
   (when (gnus-boundp 'display-time-timer)
     '(display-time-event-handler))
-  "*A hook run after Gnus checks for new news."
+  "*A hook run after Gnus checks for new news when Gnus is already running."
   :group 'gnus-group-new
   :type 'hook)
 
@@ -804,8 +807,8 @@ prompt the user for the name of an NNTP server to use."
          ;; Load whichever file is newest -- the auto save file
          ;; or the "real" file.
          (if (file-newer-than-file-p auto dribble-file)
-             (mm-insert-file-contents auto)
-           (mm-insert-file-contents dribble-file))
+             (nnheader-insert-file-contents auto)
+           (nnheader-insert-file-contents dribble-file))
          (unless (zerop (buffer-size))
            (set-buffer-modified-p t))
          ;; Set the file modes to reflect the .newsrc file modes.
@@ -1161,12 +1164,15 @@ for new groups, and subscribe the new groups as zombies."
        (when gnus-novice-user
          (gnus-message 7 "`A k' to list killed groups"))))))
 
-(defun gnus-subscribe-group (group previous &optional method)
+
+(defun gnus-subscribe-group (group &optional previous method)
+  "Subcribe GROUP and put it after PREVIOUS."
   (gnus-group-change-level
    (if method
        (list t group gnus-level-default-subscribed nil nil method)
      group)
-   gnus-level-default-subscribed gnus-level-killed previous t))
+   gnus-level-default-subscribed gnus-level-killed previous t)
+  t)
 
 ;; `gnus-group-change-level' is the fundamental function for changing
 ;; subscription levels of newsgroups.  This might mean just changing
@@ -1772,18 +1778,25 @@ newsgroup."
       (let ((prefix (gnus-group-prefixed-name "" method)))
        (goto-char (point-min))
        (while (and (not (eobp))
-                   (progn (insert prefix)
-                          (zerop (forward-line 1)))))))
+                   (progn
+                     (when (= (following-char) ?\")
+                       (forward-char 1))
+                     (insert prefix)
+                     (zerop (forward-line 1)))))))
     ;; Store the active file in a hash table.
     (goto-char (point-min))
     (let (group max min)
       (while (not (eobp))
-       (condition-case ()
+       (condition-case err
            (progn
              (narrow-to-region (point) (gnus-point-at-eol))
              ;; group gets set to a symbol interned in the hash table
              ;; (what a hack!!) - jwz
              (setq group (let ((obarray hashtb)) (read cur)))
+             ;; ### The extended group name scheme makes
+             ;; the previous optimization strategy sort of pointless...
+             (when (stringp group)
+               (setq group (intern group hashtb)))
              (if (and (numberp (setq max (read cur)))
                       (numberp (setq min (read cur)))
                       (progn
@@ -1801,7 +1814,7 @@ newsgroup."
                      (gnus-sethash (symbol-name group) t
                                    gnus-moderated-hashtb)))
                (set group nil)))
-         (error
+         (quit
           (and group
                (symbolp group)
                (set group nil))
@@ -1828,7 +1841,7 @@ newsgroup."
                     (gnus-group-prefixed-name "" method))))
 
     ;; Let the Gnus agent save the active file.
-    (if (and gnus-agent real-active)
+    (if (and gnus-agent real-active gnus-plugged (gnus-agent-method-p method))
        (progn
          (gnus-agent-save-groups method)
          (gnus-active-to-gnus-format method hashtb nil real-active))
@@ -2547,8 +2560,9 @@ If FORCE is non-nil, the .newsrc file is read."
              (let ((str (buffer-substring
                          (point) (progn (end-of-line) (point))))
                    (coding
-                    (and (boundp 'enable-multibyte-characters)
-                         enable-multibyte-characters
+                    (and (or gnus-xemacs
+                             (and (boundp 'enable-multibyte-characters)
+                                  enable-multibyte-characters))
                          (fboundp 'gnus-mule-get-coding-system)
                          (gnus-mule-get-coding-system (symbol-name group)))))
                (when coding