* gnus-async.el (gnus-async-wait-for-article): Don't use a
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 23 Jan 2003 19:21:21 +0000 (19:21 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 23 Jan 2003 19:21:21 +0000 (19:21 +0000)
timeout.

* nntp.el (nntp-accept-process-output): Removed timeout.
(nntp-read-timeout): New variable.
(nntp-accept-process-output): Use it.

* gnus-sum.el (gnus-data-find-list): Remove *.

lisp/ChangeLog
lisp/gnus-async.el
lisp/gnus-sum.el
lisp/nntp.el

index 247913e..4a7cc58 100644 (file)
@@ -1,3 +1,14 @@
+2003-01-23  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-async.el (gnus-async-wait-for-article): Don't use a
+       timeout. 
+
+       * nntp.el (nntp-accept-process-output): Removed timeout. 
+       (nntp-read-timeout): New variable.
+       (nntp-accept-process-output): Use it.
+
+       * gnus-sum.el (gnus-data-find-list): Remove *.
+
 2002-01-23  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
        * gnus-sum.el (gnus-summary-first-subject): Fixed bug that I
 2002-01-23  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
        * gnus-sum.el (gnus-summary-first-subject): Fixed bug that I
index 56d8f67..5dac280 100644 (file)
@@ -276,7 +276,7 @@ It should return non-nil if the article is to be prefetched."
          ;; needs to be done in nntp.el.
          (while (eq article gnus-async-current-prefetch-article)
            (incf tries)
          ;; needs to be done in nntp.el.
          (while (eq article gnus-async-current-prefetch-article)
            (incf tries)
-           (when (nntp-accept-process-output proc 1)
+           (when (nntp-accept-process-output proc)
              (setq tries 0))
            (when (and (not nntp-have-messaged)
                       (= tries 3))
              (setq tries 0))
            (when (and (not nntp-have-messaged)
                       (= tries 3))
index fbd3a65..a37caca 100644 (file)
@@ -2683,7 +2683,7 @@ The following commands are available:
   `(assq ,number gnus-newsgroup-data))
 
 (defmacro gnus-data-find-list (number &optional data)
   `(assq ,number gnus-newsgroup-data))
 
 (defmacro gnus-data-find-list (number &optional data)
-  `(let* ((bdata ,(or data 'gnus-newsgroup-data)))
+  `(let ((bdata ,(or data 'gnus-newsgroup-data)))
      (memq (assq ,number bdata)
           bdata)))
 
      (memq (assq ,number bdata)
           bdata)))
 
index 30234a1..ae0cfdb 100644 (file)
@@ -207,6 +207,10 @@ NOTE: This variable is never seen to work in Emacs 20 and XEmacs 21.")
   "*Hook run just before posting an article.  It is supposed to be used
 to insert Cancel-Lock headers.")
 
   "*Hook run just before posting an article.  It is supposed to be used
 to insert Cancel-Lock headers.")
 
+(defvoo nntp-read-timeout 0.1
+  "How long nntp should wait between checking for the end of output.
+Shorter values mean quicker response, but is more CPU intensive.")
+
 ;;; Internal variables.
 
 (defvar nntp-record-commands nil
 ;;; Internal variables.
 
 (defvar nntp-record-commands nil
@@ -1268,7 +1272,7 @@ password contained in '~/.nntp-authinfo'."
     (nnheader-report 'nntp message)
     message))
 
     (nnheader-report 'nntp message)
     message))
 
-(defun nntp-accept-process-output (process &optional timeout)
+(defun nntp-accept-process-output (process)
   "Wait for output from PROCESS and message some dots."
   (save-excursion
     (set-buffer (or (nntp-find-connection-buffer nntp-server-buffer)
   "Wait for output from PROCESS and message some dots."
   (save-excursion
     (set-buffer (or (nntp-find-connection-buffer nntp-server-buffer)
@@ -1278,15 +1282,18 @@ password contained in '~/.nntp-authinfo'."
       (unless (< len 10)
        (setq nntp-have-messaged t)
        (nnheader-message 7 "nntp read: %dk" len)))
       (unless (< len 10)
        (setq nntp-have-messaged t)
        (nnheader-message 7 "nntp read: %dk" len)))
-    (if timeout
-       (accept-process-output process timeout)
-      (accept-process-output process 0 100))
+    (accept-process-output
+     process
+     (truncate nntp-read-timeout)
+     (truncate (* (- nntp-read-timeout
+                    (truncate nntp-read-timeout))
+                 1000)))
     ;; accept-process-output may update status of process to indicate
     ;; that the server has closed the connection.  This MUST be
     ;; handled here as the buffer restored by the save-excursion may
     ;; be the process's former output buffer (i.e. now killed)
     (or (and process 
     ;; accept-process-output may update status of process to indicate
     ;; that the server has closed the connection.  This MUST be
     ;; handled here as the buffer restored by the save-excursion may
     ;; be the process's former output buffer (i.e. now killed)
     (or (and process 
-            (memq (process-status process) '(open run)))
+            (memq (process-status process) '(open run)))
         (nntp-report "Server closed connection"))))
 
 (defun nntp-accept-response ()
         (nntp-report "Server closed connection"))))
 
 (defun nntp-accept-response ()