* elmo-filter.el (elmo-folder-list-subfolders): Defined.
authorhmurata <hmurata>
Sun, 2 Dec 2001 15:55:15 +0000 (15:55 +0000)
committerhmurata <hmurata>
Sun, 2 Dec 2001 15:55:15 +0000 (15:55 +0000)
elmo/ChangeLog
elmo/elmo-filter.el

index 58b3ac5..6cad408 100644 (file)
@@ -1,5 +1,7 @@
 2001-12-02  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
+       * elmo-filter.el (elmo-folder-list-subfolders): Defined.
+
        * elmo-archive.el (elmo-archive-call-process): Ignore nemacs.
 
        * elmo-msgdb.el (elmo-msgdb-insert-file-header): Ditto.
index e98d034..9befea4 100644 (file)
    important-mark)
   (elmo-filter-folder-list-importants-internal folder important-mark))
 
+(luna-define-method elmo-folder-list-subfolders ((folder elmo-filter-folder)
+                                                &optional one-level)
+  (let* ((target (elmo-filter-folder-target-internal folder))
+        (prefix (and (string-match
+                      (concat "^\\(.*\\)"
+                              (regexp-quote
+                               (elmo-folder-name-internal
+                                target))
+                              "$")
+                      (elmo-folder-name-internal folder))
+                     (match-string 1 (elmo-folder-name-internal
+                                      folder)))))
+    (elmo-mapcar-list-of-list
+     (lambda (x) (concat prefix x))
+     (elmo-folder-list-subfolders target one-level))))
+
 (luna-define-method elmo-folder-diff :around ((folder elmo-filter-folder)
                                              &optional numbers)
   (if (not (and (vectorp (elmo-filter-folder-condition-internal