summaryrefslogtreecommitdiff
path: root/lisp/gnus/pop3.el
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2011-05-30 22:11:52 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2011-05-30 22:11:52 +0000
commitb5244046e1ea76b26b7acd516929502463b05eaf (patch)
treefea243d35ae0e2e457bc2adfcd2c2548aa6e3de1 /lisp/gnus/pop3.el
parent1257e75502973fcdf4c2bbedaad4df0240171071 (diff)
downloademacs-b5244046e1ea76b26b7acd516929502463b05eaf.tar.gz
Merge changes made in Gnus trunk.
gnus-group.el (gnus-group-mark-article-read): It's possible that we want to have `gnus-newsgroup-unselected' kept sorted. If this isn't done, then unselected articles may be marked as read. pop3.el (pop3-open-server): Erase the buffer after the greeting, since not doing this seems to lead to a race condition in pop3-logon. nnvirtual.el (nnvirtual-request-article): Bind `gnus-command-method' so that the call chain it correct when we call "upwards". gnus-sum.el (gnus-select-newsgroup): Auto-expiry doesn't make sense in read-only groups. gnus-group.el (gnus-group-mark-article-read): Ditto. message.el (message-cite-reply-position): Doc string fix. nnimap.el (nnimap-transform-headers): Simplify regexp to hopefully avoid regexp overflow. (nnimap-transform-split-mail): Ditto. pop3.el (pop3-retr): Error out if the server closes the connection.
Diffstat (limited to 'lisp/gnus/pop3.el')
-rw-r--r--lisp/gnus/pop3.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el
index 6f12d3d63e1..90e11b3ca8f 100644
--- a/lisp/gnus/pop3.el
+++ b/lisp/gnus/pop3.el
@@ -319,6 +319,7 @@ Returns the process associated with the connection."
(substring response (or (string-match "<" response) 0)
(+ 1 (or (string-match ">" response) -1)))))
(pop3-set-process-query-on-exit-flag (car result) nil)
+ (erase-buffer)
(car result)))))
;; Support functions
@@ -514,6 +515,8 @@ Otherwise, return the size of the message-id MSG"
(let ((start pop3-read-point) end)
(with-current-buffer (process-buffer process)
(while (not (re-search-forward "^\\.\r\n" nil t))
+ (unless (memq (process-status process) '(open run))
+ (error "pop3 server closed the connection"))
(pop3-accept-process-output process)
(goto-char start))
(setq pop3-read-point (point-marker))