* nntp.el (nntp-wait-for-string): Check for a process in the current buffer
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 10 Sep 2002 07:40:40 +0000 (07:40 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 10 Sep 2002 07:40:40 +0000 (07:40 +0000)
 instead of `nntp-server-buffer'.

lisp/ChangeLog
lisp/nntp.el

index dec07eb..e08b5bb 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-10  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * nntp.el (nntp-wait-for-string): Check for a process in the
+       current buffer instead of `nntp-server-buffer'.
+
 2002-09-09  Simon Josefsson  <jas@extundo.com>
 
        * gnus-art.el (gnus-button-man-handler): New variable.
        * gnus-srvr.el (gnus-browse-make-menu-bar): Add "d".
 
        * gnus-sum.el (gnus-summary-limit-to-unseen): New command and
-       keystroke. 
+       keystroke.
 
        * gnus-srvr.el (gnus-browse-describe-group): New command and
-       keystroke. 
+       keystroke.
 
 2002-09-06  Katsumi Yamaoka  <yamaoka@jpl.org>
 
index dbd01ea..59cb247 100644 (file)
@@ -1458,11 +1458,13 @@ password contained in '~/.nntp-authinfo'."
 
 (defun nntp-wait-for-string (regexp)
   "Wait until string arrives in the buffer."
-  (let ((buf (current-buffer)))
+  (let ((buf (current-buffer))
+       proc)
     (goto-char (point-min))
-    (while (and (nntp-find-connection nntp-server-buffer)
+    (while (and (setq proc (get-buffer-process buf))
+               (memq (process-status proc) '(open run))
                (not (re-search-forward regexp nil t)))
-      (accept-process-output (nntp-find-connection nntp-server-buffer))
+      (accept-process-output proc)
       (set-buffer buf)
       (goto-char (point-min)))))