(gnus-point-at-bol, gnus-point-at-eol): Remove.
[gnus] / lisp / nntp.el
index 9a4e114..d452a98 100644 (file)
@@ -445,7 +445,7 @@ be restored and the command retried."
              (goto-char pos)
              (if (looking-at (regexp-quote command))
                  (delete-region pos (progn (forward-line 1)
-                                           (gnus-point-at-bol))))
+                                           (point-at-bol))))
              )))
       (nnheader-report 'nntp "Couldn't open connection to %s."
                       nntp-address))))
@@ -470,8 +470,7 @@ be restored and the command retried."
              (goto-char pos)
              (if (looking-at (regexp-quote command))
                  (delete-region pos (progn (forward-line 1)
-                                           (gnus-point-at-bol))))
-             )))
+                                           (point-at-bol)))))))
       (nnheader-report 'nntp "Couldn't open connection to %s."
                       nntp-address))))
 
@@ -499,7 +498,7 @@ be restored and the command retried."
          (set-buffer buffer)
          (goto-char pos)
          (if (looking-at (regexp-quote command))
-             (delete-region pos (progn (forward-line 1) (gnus-point-at-bol))))
+             (delete-region pos (progn (forward-line 1) (point-at-bol))))
          )))
       (nnheader-report 'nntp "Couldn't open connection to %s."
                       nntp-address))))
@@ -1064,7 +1063,7 @@ password contained in '~/.nntp-authinfo'."
       (nntp-send-command "^3.*\r?\n" "AUTHINFO USER" (user-login-name))
       (nntp-send-command
        "^2.*\r?\n" "AUTHINFO PASS"
-       (buffer-substring (point) (gnus-point-at-eol))))))
+       (buffer-substring (point) (point-at-eol))))))
 
 ;;; Internal functions.
 
@@ -1425,8 +1424,7 @@ password contained in '~/.nntp-authinfo'."
          in-process-buffer-p
          (buf nntp-server-buffer)
          (process-buffer (nntp-find-connection-buffer nntp-server-buffer))
-         first
-          last)
+         first last status)
       ;; We have to check `nntp-server-xover'.  If it gets set to nil,
       ;; that means that the server does not understand XOVER, but we
       ;; won't know that until we try.
@@ -1460,15 +1458,22 @@ password contained in '~/.nntp-authinfo'."
            (while (progn
                     (goto-char (or last-point (point-min)))
                     ;; Count replies.
-                    (while (re-search-forward "^[0-9][0-9][0-9] .*\n" nil t)
-                      (incf received))
+                    (while (re-search-forward "^\\([0-9][0-9][0-9]\\) .*\n"
+                                              nil t)
+                      (incf received)
+                      (setq status (match-string 1))
+                      (if (string-match "^[45]" status)
+                          (setq status 'error)
+                        (setq status 'ok)))
                     (setq last-point (point))
                     (or (< received count)
-                        ;; I haven't started reading the final response
-                         (progn
-                           (goto-char (point-max))
-                           (forward-line -1)
-                           (not (looking-at "^\\.\r?\n")))))
+                        (if (eq status 'error)
+                            nil
+                          ;; I haven't started reading the final response
+                          (progn
+                            (goto-char (point-max))
+                            (forward-line -1)
+                            (not (looking-at "^\\.\r?\n"))))))
              ;; I haven't read the end of the final response
              (nntp-accept-response)
              (set-buffer process-buffer))))