* elmo-pop3.el (elmo-pop3-read-contents): Fix double `goto-char'.
[elisp/wanderlust.git] / elmo / elmo-pop3.el
index 5538f50..43932de 100644 (file)
@@ -470,9 +470,9 @@ until the login delay period has expired"))
   (with-current-buffer (process-buffer process)
     (let ((case-fold-search nil)
          (point elmo-pop3-read-point))
-      (while (and (goto-char (max (- point 2) (point-min)))
+      (while (and (goto-char (- point 2))
                  (not (search-forward "\r\n.\r\n" nil t)))
-       (setq point (goto-char (point-max)))
+       (setq point (- (point-max) 2)) ; Care of \r\n.\r[EOF] case
        (accept-process-output process 1))
       (elmo-delete-cr
        (buffer-substring elmo-pop3-read-point