From f99a54273844588779955992f0d05d37536bceb5 Mon Sep 17 00:00:00 2001 From: hmurata Date: Sun, 15 Oct 2006 03:33:15 +0000 Subject: [PATCH] (elmo-imap4-arrival-filter): Use `case' instead of `cond'. --- elmo/ChangeLog | 5 +++++ elmo/elmo-imap4.el | 27 ++++++++++++--------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 42bd39c..9605ca4 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2006-10-15 Hiroya Murata + + * elmo-imap4.el (elmo-imap4-arrival-filter): Use `case' instead of + `cond'. + 2006-10-15 Yoichi NAKAYAMA * elmo-imap4.el (elmo-imap4-arrival-filter): Call delete-region in diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 5377955..7d28259 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -1278,21 +1278,18 @@ Return nil if no complete line has arrived." (delete-backward-char (length elmo-imap4-server-eol)) (goto-char (point-min)) (unwind-protect - (cond ((eq elmo-imap4-status 'initial) - (setq elmo-imap4-current-response - (list - (list 'greeting (elmo-imap4-parse-greeting))))) - ((or (eq elmo-imap4-status 'auth) - (eq elmo-imap4-status 'nonauth) - (eq elmo-imap4-status 'selected) - (eq elmo-imap4-status 'examine)) - (setq elmo-imap4-current-response - (cons - (elmo-imap4-parse-response) - elmo-imap4-current-response))) - (t - (message "Unknown state %s in arrival filter" - elmo-imap4-status))) + (case elmo-imap4-status + (initial + (setq elmo-imap4-current-response + (list + (list 'greeting (elmo-imap4-parse-greeting))))) + ((auth nonauth selected examine) + (setq elmo-imap4-current-response + (cons (elmo-imap4-parse-response) + elmo-imap4-current-response))) + (t + (message "Unknown state %s in arrival filter" + elmo-imap4-status))) (delete-region (point-min) (point-max))))))))) ;; IMAP parser. -- 1.7.10.4