* nntp.el (nntp-accept-process-output): Use new function.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 31 Mar 2003 17:07:31 +0000 (17:07 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 31 Mar 2003 17:07:31 +0000 (17:07 +0000)
* nnheader.el (nnheader-read-timeout): New variable.
(nnheader-accept-process-output): New function.

* nntp.el (nntp-read-timeout): Removed.

lisp/ChangeLog
lisp/gnus-fun.el
lisp/nnheader.el
lisp/nntp.el

index 9ce2fbd..0507362 100644 (file)
@@ -5,6 +5,13 @@
 
 2003-03-31  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * nntp.el (nntp-accept-process-output): Use new function.
+
+       * nnheader.el (nnheader-read-timeout): New variable.
+       (nnheader-accept-process-output): New function.
+
+       * nntp.el (nntp-read-timeout): Removed.
+
        * gnus-sum.el (gnus-summary-prepare-threads): Add comment.
 
 2003-03-30  Katsumi Yamaoka  <yamaoka@jpl.org>
index f8afca8..7ef21f9 100644 (file)
@@ -222,7 +222,7 @@ colors of the displayed X-Faces."
      (format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | ppmnorm 2>/dev/null | pnmscale -width 48 -height 48 | ppmtopgm > /tmp/gnus.face.ppm"
             file))
     (let ((gnus-convert-image-to-face-command
-          (format "cat '%%s' | ppmchange %s | ppmquant %%d | pnmtopng"
+          (format "cat '%%s' | ppmquant %%d | ppmchange %s | pnmtopng"
                   (gnus-fun-ppm-change-string))))
       (setq result (gnus-face-from-file "/tmp/gnus.face.ppm")))
     (delete-file file)
index 6d52131..61797df 100644 (file)
@@ -70,6 +70,14 @@ Integer values will in effect be rounded up to the nearest multiple of
 (defvar nnheader-head-chop-length 2048
   "*Length of each read operation when trying to fetch HEAD headers.")
 
+(defvar nnheader-read-timeout
+  (if (string-match "windows-nt\\|os/2\\|emx\\|cygwin"
+                   (symbol-name system-type))
+      1.0
+    0.1)
+  "How long nntp should wait between checking for the end of output.
+Shorter values mean quicker response, but is more CPU intensive.")
+
 (defvar nnheader-file-name-translation-alist
   (let ((case-fold-search t))
     (cond
@@ -1000,6 +1008,14 @@ find-file-hooks, etc.
 (defalias 'nnheader-cancel-function-timers 'cancel-function-timers)
 (defalias 'nnheader-string-as-multibyte 'string-as-multibyte)
 
+(defun nnheader-accept-process-output (process)
+  (accept-process-output
+   process
+   (truncate nnheader-read-timeout)
+   (truncate (* (- nnheader-read-timeout
+                  (truncate nnheader-read-timeout))
+               1000))))
+
 (when (featurep 'xemacs)
   (require 'nnheaderxm))
 
index b2ff431..f3faa73 100644 (file)
@@ -208,13 +208,6 @@ 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 (if (string-match "windows-nt\\|os/2\\|emx\\|cygwin"
-                                           (symbol-name system-type))
-                             1.0
-                           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
@@ -1308,12 +1301,7 @@ password contained in '~/.nntp-authinfo'."
       (unless (< len 10)
        (setq nntp-have-messaged t)
        (nnheader-message 7 "nntp read: %dk" len)))
-    (accept-process-output
-     process
-     (truncate nntp-read-timeout)
-     (truncate (* (- nntp-read-timeout
-                    (truncate nntp-read-timeout))
-                 1000)))
+    (nnheader-accept-process-output 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