X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fpop3.el;h=b192853b92a0e6c6a898bd0d861d288b4a8c8707;hb=9a60f093f45ad3169be0d0cc4a2bf75ba599aca8;hp=43cf9162fd9cd2c40fd36c73e51328fa61c95c7d;hpb=4e6ed4bd8e175ab78acf62b8f5e9a8af0e703992;p=gnus diff --git a/lisp/pop3.el b/lisp/pop3.el index 43cf9162f..b192853b9 100644 --- a/lisp/pop3.el +++ b/lisp/pop3.el @@ -75,7 +75,7 @@ Used for APOP authentication.") ;; query for password (if (and pop3-password-required (not pop3-password)) (setq pop3-password - (pop3-read-passwd (format "Password for %s: " pop3-maildrop)))) + (read-passwd (format "Password for %s: " pop3-maildrop)))) (cond ((equal 'apop pop3-authentication-scheme) (pop3-apop process pop3-maildrop)) ((equal 'pass pop3-authentication-scheme) @@ -85,8 +85,8 @@ Used for APOP authentication.") (setq message-count (car (pop3-stat process))) (unwind-protect (while (<= n message-count) - (message (format "Retrieving message %d of %d from %s..." - n message-count pop3-mailhost)) + (message "Retrieving message %d of %d from %s..." + n message-count pop3-mailhost) (pop3-retr process n crashbuf) (save-excursion (set-buffer crashbuf) @@ -117,7 +117,7 @@ Used for APOP authentication.") ;; query for password (if (and pop3-password-required (not pop3-password)) (setq pop3-password - (pop3-read-passwd (format "Password for %s: " pop3-maildrop)))) + (read-passwd (format "Password for %s: " pop3-maildrop)))) (cond ((equal 'apop pop3-authentication-scheme) (pop3-apop process pop3-maildrop)) ((equal 'pass pop3-authentication-scheme) @@ -174,7 +174,7 @@ Return the response string if optional second argument is non-nil." (set-buffer (process-buffer process)) (goto-char pop3-read-point) (while (not (search-forward "\r\n" nil t)) - (accept-process-output process 0 500) + (nnheader-accept-process-output process) (goto-char pop3-read-point)) (setq match-end (point)) (goto-char pop3-read-point) @@ -188,17 +188,6 @@ Return the response string if optional second argument is non-nil." t) ))))) -(defvar pop3-read-passwd nil) -(defun pop3-read-passwd (prompt) - (if (not pop3-read-passwd) - (if (fboundp 'read-passwd) - (setq pop3-read-passwd 'read-passwd) - (if (load "passwd" t) - (setq pop3-read-passwd 'read-passwd) - (autoload 'ange-ftp-read-passwd "ange-ftp") - (setq pop3-read-passwd 'ange-ftp-read-passwd)))) - (funcall pop3-read-passwd prompt)) - (defun pop3-clean-region (start end) (setq end (set-marker (make-marker) end)) (save-excursion @@ -312,7 +301,7 @@ If NOW, use that time instead." (let ((pass pop3-password)) (if (and pop3-password-required (not pass)) (setq pass - (pop3-read-passwd (format "Password for %s: " pop3-maildrop)))) + (read-passwd (format "Password for %s: " pop3-maildrop)))) (if pass (let ((hash (pop3-md5 (concat pop3-timestamp pass)))) (pop3-send-command process (format "APOP %s %s" user hash)) @@ -359,7 +348,8 @@ This function currently does nothing.") (save-excursion (set-buffer (process-buffer process)) (while (not (re-search-forward "^\\.\r\n" nil t)) - (accept-process-output process 0 500) + ;; Fixme: Shouldn't depend on nnheader. + (nnheader-accept-process-output process) ;; bill@att.com ... to save wear and tear on the heap ;; uncommented because the condensed version below is a problem for ;; some.