From: Lars Magne Ingebrigtsen Date: Thu, 23 Jan 2003 19:21:21 +0000 (+0000) Subject: * gnus-async.el (gnus-async-wait-for-article): Don't use a X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=3721b0cfbe13b154238ebaec65521ea777377dbc * 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 *. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 247913e72..4a7cc5874 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2003-01-23 Lars Magne Ingebrigtsen + + * 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 * gnus-sum.el (gnus-summary-first-subject): Fixed bug that I diff --git a/lisp/gnus-async.el b/lisp/gnus-async.el index 56d8f67ee..5dac2800f 100644 --- a/lisp/gnus-async.el +++ b/lisp/gnus-async.el @@ -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) - (when (nntp-accept-process-output proc 1) + (when (nntp-accept-process-output proc) (setq tries 0)) (when (and (not nntp-have-messaged) (= tries 3)) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index fbd3a65d6..a37caca03 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2683,7 +2683,7 @@ The following commands are available: `(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))) diff --git a/lisp/nntp.el b/lisp/nntp.el index 30234a15f..ae0cfdbbd 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -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.") +(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 @@ -1268,7 +1272,7 @@ password contained in '~/.nntp-authinfo'." (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) @@ -1278,15 +1282,18 @@ password contained in '~/.nntp-authinfo'." (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 - (memq (process-status process) '(open run))) + (memq (process-status process) '(open run))) (nntp-report "Server closed connection")))) (defun nntp-accept-response ()