Importing Pterodactyl Gnus v0.97.
[elisp/gnus.git-] / lisp / gnus-srvr.el
index 849a2da..50048bc 100644 (file)
@@ -1,5 +1,5 @@
 ;;; gnus-srvr.el --- virtual server support for Gnus
-;; Copyright (C) 1995,96,97,98 Free Software Foundation, Inc.
+;; Copyright (C) 1995,96,97,98,99 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -135,6 +135,9 @@ The following specs are understood:
     "D" gnus-server-deny-server
     "R" gnus-server-remove-denials
 
+    "n" next-line
+    "p" previous-line
+    
     "g" gnus-server-regenerate-server
 
     "\C-c\C-i" gnus-info-find-node
@@ -550,9 +553,9 @@ The following commands are available:
 
 (defun gnus-browse-foreign-server (server &optional return-buffer)
   "Browse the server SERVER."
-  (setq gnus-browse-current-method server)
+  (setq gnus-browse-current-method (gnus-server-to-method server))
   (setq gnus-browse-return-buffer return-buffer)
-  (let* ((method (gnus-server-to-method server))
+  (let* ((method gnus-browse-current-method)
         (gnus-select-method method)
         groups group)
     (gnus-message 5 "Connecting to %s..." (nth 1 method))
@@ -589,14 +592,12 @@ The following commands are available:
          (goto-char (point-min))
          (unless (string= gnus-ignored-newsgroups "")
            (delete-matching-lines gnus-ignored-newsgroups))
-         (while (re-search-forward
-                 "\\(^[^ \t]+\\)[ \t]+[0-9]+[ \t]+[0-9]+" nil t)
-           (goto-char (match-end 1))
-           (condition-case ()
-               (push (cons (match-string 1)
-                           (max 0 (- (1+ (read cur)) (read cur))))
-                     groups)
-             (error nil)))))
+         (while (not (eobp)) 
+           (ignore-errors
+             (push (cons (read cur)
+                         (max 0 (- (1+ (read cur)) (read cur))))
+                   groups))
+           (forward-line))))
       (setq groups (sort groups
                         (lambda (l1 l2)
                           (string< (car l1) (car l2)))))
@@ -654,7 +655,7 @@ buffer.
          (error "Couldn't enter %s" group))
       (unless (gnus-group-read-group nil no-article group)
        (error "Couldn't enter %s" group)))))
-      
+
 (defun gnus-browse-select-group ()
   "Select the current group."
   (interactive)
@@ -706,7 +707,7 @@ buffer.
     (save-excursion
       (beginning-of-line)
       ;; If this group it killed, then we want to subscribe it.
-      (when (= (following-char) ?K)
+      (when (eq (char-after) ?K)
        (setq sub t))
       (setq group (gnus-browse-group-name))
       (when (and sub