diff options
author | Miles Bader <miles@gnu.org> | 2009-01-09 03:01:50 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2009-01-09 03:01:50 +0000 |
commit | e3e955fed38da9263f3904f15233ccfd0dbbbe43 (patch) | |
tree | 6a34615ae6e5699c8b7dfba64dfae3486ded203f /lisp/gnus/pop3.el | |
parent | 2188975fbff1202d011db2f82d728fc5fb5f9346 (diff) | |
download | emacs-e3e955fed38da9263f3904f15233ccfd0dbbbe43.tar.gz emacs-e3e955fed38da9263f3904f15233ccfd0dbbbe43.tar.bz2 emacs-e3e955fed38da9263f3904f15233ccfd0dbbbe43.zip |
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1513
Diffstat (limited to 'lisp/gnus/pop3.el')
-rw-r--r-- | lisp/gnus/pop3.el | 49 |
1 files changed, 22 insertions, 27 deletions
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index a99cff74433..2ca09d88277 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el @@ -105,33 +105,28 @@ Used for APOP authentication.") (defvar pop3-read-point nil) (defvar pop3-debug nil) -;; Borrowed from nnheader-accept-process-output in nnheader.el. -(defvar pop3-read-timeout - (if (string-match "windows-nt\\|os/2\\|emx\\|cygwin" - (symbol-name system-type)) - ;; http://thread.gmane.org/v9655t3pjo.fsf@marauder.physik.uni-ulm.de - ;; - ;; IIRC, values lower than 1.0 didn't/don't work on Windows/DOS. - ;; - ;; There should probably be a runtime test to determine the timing - ;; resolution, or a primitive to report it. I don't know off-hand - ;; what's possible. Perhaps better, maybe the Windows/DOS primitive - ;; could round up non-zero timeouts to a minimum of 1.0? - 1.0 - 0.1) - "How long pop3 should wait between checking for the end of output. +;; Borrowed from nnheader-accept-process-output in nnheader.el. See the +;; comments there for explanations about the values. + +(eval-and-compile + (if (and (fboundp 'nnheader-accept-process-output) + (boundp 'nnheader-read-timeout)) + (defalias 'pop3-accept-process-output 'nnheader-accept-process-output) + ;; Borrowed from `nnheader.el': + (defvar pop3-read-timeout + (if (string-match "windows-nt\\|os/2\\|emx\\|cygwin" + (symbol-name system-type)) + 1.0 + 0.01) + "How long pop3 should wait between checking for the end of output. Shorter values mean quicker response, but are more CPU intensive.") - -;; Borrowed from nnheader-accept-process-output in nnheader.el. -(defun pop3-accept-process-output (process) - (accept-process-output - process - (truncate pop3-read-timeout) - (truncate (* (- pop3-read-timeout - (truncate pop3-read-timeout)) - 1000)))) - -(autoload 'nnheader-accept-process-output "nnheader") + (defun pop3-accept-process-output (process) + (accept-process-output + process + (truncate pop3-read-timeout) + (truncate (* (- pop3-read-timeout + (truncate pop3-read-timeout)) + 1000)))))) (defun pop3-movemail (&optional crashbox) "Transfer contents of a maildrop to the specified CRASHBOX." @@ -171,7 +166,7 @@ Shorter values mean quicker response, but are more CPU intensive.") (unless pop3-leave-mail-on-server (pop3-dele process n)) (setq n (+ 1 n)) - (nnheader-accept-process-output process)) + (pop3-accept-process-output process)) (when (and pop3-leave-mail-on-server (> n 1)) (message "pop3.el doesn't support UIDL. Setting `pop3-leave-mail-on-server' |