From 144ad8d8073b3949634faa0f17fc4b4264b1d790 Mon Sep 17 00:00:00 2001 From: dmaus Date: Wed, 13 Oct 2010 19:31:29 +0000 Subject: [PATCH] * elmo-multi.el (elmo-folder-open-internal-p): Start with t and set to nil if one of the child folders is not open. (elmo-folder-open-internal): Open child folders only if they are not opened yet. --- elmo/ChangeLog | 7 +++++++ elmo/elmo-multi.el | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index c1dd3b3..a2d54a7 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,10 @@ +2010-10-13 David Maus + + * elmo-multi.el (elmo-folder-open-internal-p): Start with t and + set to nil if one of the child folders is not open. + (elmo-folder-open-internal): Open child folders only if they are + not opened yet. + 2010-08-31 TAKAHASHI Kaoru * elmo-imap4.el: Remove trailing whitespace. diff --git a/elmo/elmo-multi.el b/elmo/elmo-multi.el index 122a6df..a661905 100644 --- a/elmo/elmo-multi.el +++ b/elmo/elmo-multi.el @@ -121,10 +121,11 @@ (luna-define-method elmo-folder-open-internal ((folder elmo-multi-folder)) (dolist (fld (elmo-multi-folder-children-internal folder)) - (elmo-folder-open-internal fld))) + (unless (elmo-folder-open-internal-p fld) + (elmo-folder-open-internal fld)))) (luna-define-method elmo-folder-open-internal-p ((folder elmo-multi-folder)) - (let (open) + (let (open t) (dolist (fld (elmo-multi-folder-children-internal folder)) (setq open (and open (elmo-folder-open-internal-p fld)))))) -- 1.7.10.4