From e1aca9586e3b40cb9e143e8009f97bc786325f7a Mon Sep 17 00:00:00 2001 From: okazaki Date: Mon, 30 Jun 2008 05:31:17 +0000 Subject: [PATCH] 2008-06-30 Tetsurou Okazaki * elmo-imap4.el (elmo-imap4-parse-status): Use `case' instead of `cond'. 2008-06-30 Don Bashford * elmo-imap4.el (elmo-imap4-parse-status): Accept IMAP4 tokens in a case-insensitive fashion. --- elmo/ChangeLog | 9 +++++++++ elmo/elmo-imap4.el | 33 +++++++++++++++++---------------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 613d42a..4f7bb6a 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,12 @@ +2008-06-30 Tetsurou Okazaki + + * elmo-imap4.el (elmo-imap4-parse-status): Use `case' instead of `cond'. + +2008-06-30 Don Bashford + + * elmo-imap4.el (elmo-imap4-parse-status): Accept IMAP4 tokens in a + case-insensitive fashion. + 2008-03-30 Tetsurou Okazaki * elmo-imap4.el (elmo-imap4-send-command): Combine `process-send-string' calls. diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index f318675..0cc8e37 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -1602,22 +1602,23 @@ Return nil if no complete line has arrived." (setq status (cons (let ((token (read (current-buffer)))) - (cond ((eq token 'MESSAGES) - (list 'messages (read (current-buffer)))) - ((eq token 'RECENT) - (list 'recent (read (current-buffer)))) - ((eq token 'UIDNEXT) - (list 'uidnext (read (current-buffer)))) - ((eq token 'UIDVALIDITY) - (and (looking-at " \\([0-9]+\\)") - (prog1 (list 'uidvalidity (match-string 1)) - (goto-char (match-end 1))))) - ((eq token 'UNSEEN) - (list 'unseen (read (current-buffer)))) - (t - (message - "Unknown status data %s in mailbox %s ignored" - token mailbox)))) + (case (intern (upcase (symbol-name token))) + (MESSAGES + (list 'messages (read (current-buffer)))) + (RECENT + (list 'recent (read (current-buffer)))) + (UIDNEXT + (list 'uidnext (read (current-buffer)))) + (UIDVALIDITY + (and (looking-at " \\([0-9]+\\)") + (prog1 (list 'uidvalidity (match-string 1)) + (goto-char (match-end 1))))) + (UNSEEN + (list 'unseen (read (current-buffer)))) + (t + (message + "Unknown status data %s in mailbox %s ignored" + token mailbox)))) status)) (skip-chars-forward " "))) (and elmo-imap4-status-callback -- 1.7.10.4