From 129ba17ee2b41bc7f6d10a871fb5db09dcc4a968 Mon Sep 17 00:00:00 2001 From: hmurata Date: Thu, 17 Feb 2005 18:27:44 +0000 Subject: [PATCH] (elmo-imap4-flags-to-imap): Preserve argument `flags'. --- elmo/ChangeLog | 5 +++++ elmo/elmo-imap4.el | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 572cf35..05ba06b 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2005-02-17 Hiroya Murata + + * elmo-imap4.el (elmo-imap4-flags-to-imap): Preserve argument + `flags'. + 2005-02-16 Hiroya Murata * elmo-filter.el (elmo-message-set-cached): Call diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index c3b88af..b59cfc2 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -2582,13 +2582,14 @@ If optional argument REMOVE is non-nil, remove FLAG." (defun elmo-imap4-flags-to-imap (flags) "Convert FLAGS to the IMAP flag string." - (let ((imap-flag (if (not (memq 'unread flags)) "\\Seen")) - (flags (delq 'read (delq 'cached (delq 'unread flags)))) - spec) + (let ((imap-flag (if (not (memq 'unread flags)) "\\Seen"))) (dolist (flag flags) - (setq imap-flag (concat imap-flag (if imap-flag " ") - (or (car (cdr (assq flag elmo-imap4-flag-specs))) - (capitalize (symbol-name flag)))))) + (unless (memq flag '(new read unread cached)) + (setq imap-flag + (concat imap-flag + (if imap-flag " ") + (or (car (cdr (assq flag elmo-imap4-flag-specs))) + (capitalize (symbol-name flag))))))) imap-flag)) (luna-define-method elmo-folder-append-buffer -- 1.7.10.4