* elmo-multi.el (elmo-folder-open-internal-p): Start with t and
authordmaus <dmaus>
Wed, 13 Oct 2010 19:31:29 +0000 (19:31 +0000)
committerdmaus <dmaus>
Wed, 13 Oct 2010 19:31:29 +0000 (19:31 +0000)
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
elmo/elmo-multi.el

index c1dd3b3..a2d54a7 100644 (file)
@@ -1,3 +1,10 @@
+2010-10-13  David Maus  <dmaus@ictsoc.de>
+
+       * 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  <kaoru@kaisei.org>
 
        * elmo-imap4.el: Remove trailing whitespace.
index 122a6df..a661905 100644 (file)
 
 (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))))))