Mercurial > emacs
comparison lisp/gnus/pop3.el @ 110224:3d216398af49
pop3.el (pop3-number-of-responses): Search for "+OK", not "+OK ".
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Mon, 06 Sep 2010 02:09:42 +0000 |
parents | 3d982e5c5f58 |
children | ef15e8533a1c |
comparison
equal
deleted
inserted
replaced
110223:109e3a627792 | 110224:3d216398af49 |
---|---|
31 | 31 |
32 ;; This program was inspired by Kyle E. Jones's vm-pop program. | 32 ;; This program was inspired by Kyle E. Jones's vm-pop program. |
33 | 33 |
34 ;;; Code: | 34 ;;; Code: |
35 | 35 |
36 (eval-when-compile (require 'cl)) | |
36 (require 'mail-utils) | 37 (require 'mail-utils) |
37 (defvar parse-time-months) | 38 (defvar parse-time-months) |
38 | 39 |
39 (defgroup pop3 nil | 40 (defgroup pop3 nil |
40 "Post Office Protocol." | 41 "Post Office Protocol." |
202 | 203 |
203 (defun pop3-number-of-responses (endp) | 204 (defun pop3-number-of-responses (endp) |
204 (let ((responses 0)) | 205 (let ((responses 0)) |
205 (save-excursion | 206 (save-excursion |
206 (goto-char (point-min)) | 207 (goto-char (point-min)) |
207 (while (or (and (re-search-forward "^\\+OK " nil t) | 208 (while (or (and (re-search-forward "^\\+OK" nil t) |
208 (or (not endp) | 209 (or (not endp) |
209 (re-search-forward "^\\.\r?\n" nil t))) | 210 (re-search-forward "^\\.\r?\n" nil t))) |
210 (re-search-forward "^-ERR " nil t)) | 211 (re-search-forward "^-ERR " nil t)) |
211 (incf responses))) | 212 (incf responses))) |
212 responses)) | 213 responses)) |