From a3dd86b60eaaee21cde91babd091eb43d37b4428 Mon Sep 17 00:00:00 2001 From: teranisi Date: Tue, 26 Dec 2000 08:33:07 +0000 Subject: [PATCH] 2000-12-26 Yuuichi Teranishi * elmo-util.el (elmo-folder-get-store-type): Rewrite. 2000-12-26 OKAZAKI Tetsurou * elmo-util.el (elmo-folder-get-store-type): New function. (elmo-folder-direct-copy-p): Use it. --- elmo/ChangeLog | 9 +++++++++ elmo/elmo-util.el | 12 ++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index e72dbe6..9b5f1e9 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,14 @@ 2000-12-26 Yuuichi Teranishi + * elmo-util.el (elmo-folder-get-store-type): Rewrite. + +2000-12-26 OKAZAKI Tetsurou + + * elmo-util.el (elmo-folder-get-store-type): New function. + (elmo-folder-direct-copy-p): Use it. + +2000-12-26 Yuuichi Teranishi + * elmo-imap4.el (elmo-imap4-msgdb-create): Set `elmo-imap4-fetch-callback-data' as a cons cell of `args' and result of `elmo-imap4-use-flag-p'. diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 0f29e83..2611cf4 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -1230,6 +1230,14 @@ Otherwise treat \\ in NEWTEXT string as special: (t (elmo-folder-direct-copy-p folder1 folder2)))) +(defun elmo-folder-get-store-type (folder) + (let ((spec (elmo-folder-get-spec folder))) + (case (car spec) + (filter (elmo-folder-get-store-type (nth 2 spec))) + (pipe (elmo-folder-get-store-type (elmo-pipe-spec-dst spec))) + (multi (elmo-folder-get-store-type (nth 1 spec))) + (t (car spec))))) + (defconst elmo-folder-direct-copy-alist '((localdir . (localdir localnews archive)) (maildir . (maildir localdir localnews archive)) @@ -1238,8 +1246,8 @@ Otherwise treat \\ in NEWTEXT string as special: (cache . (localdir localnews archive)))) (defun elmo-folder-direct-copy-p (src-folder dst-folder) - (let ((src-type (car (elmo-folder-get-spec src-folder))) - (dst-type (car (elmo-folder-get-spec dst-folder))) + (let ((src-type (elmo-folder-get-store-type src-folder)) + (dst-type (elmo-folder-get-store-type dst-folder)) dst-copy-type) (and (setq dst-copy-type (cdr (assq src-type elmo-folder-direct-copy-alist))) -- 1.7.10.4