From: hmurata Date: Sun, 14 Dec 2003 10:26:06 +0000 (+0000) Subject: * elmo-internal.el (elmo-folder-list-subfolders): Rewrite; Fixed X-Git-Tag: wl-2_11_23~21 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e44cbc393d1ac544a676fa7c4c75b28db4f57759;p=elisp%2Fwanderlust.git * elmo-internal.el (elmo-folder-list-subfolders): Rewrite; Fixed behavior when one-level is nil. * elmo-flag.el (elmo-folder-list-subfolders): Defined. * elmo-sendlog.el (elmo-folder-have-subfolder-p): Ditto. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index dae5dbd..664cab6 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,12 @@ +2003-12-14 Hiroya Murata + + * elmo-internal.el (elmo-folder-list-subfolders): Rewrite; Fixed + behavior when one-level is nil. + + * elmo-flag.el (elmo-folder-list-subfolders): Defined. + + * elmo-sendlog.el (elmo-folder-have-subfolder-p): Ditto. + 2003-12-06 Hiroya Murata * elmo.el (elmo-folder-set-info-max-by-numdb): Don't use `sort' to diff --git a/elmo/elmo-flag.el b/elmo/elmo-flag.el index 895c99e..c7ed570 100644 --- a/elmo/elmo-flag.el +++ b/elmo/elmo-flag.el @@ -96,6 +96,16 @@ (expand-file-name ".minfo" (elmo-folder-msgdb-path folder)) (elmo-flag-folder-minfo-internal folder))) +(luna-define-method elmo-folder-list-subfolders ((folder elmo-flag-folder) + &optional one-level) + (mapcar (lambda (flag) + (concat + (elmo-folder-prefix-internal folder) + (symbol-name (elmo-folder-type-internal folder)) + "/" + (symbol-name flag))) + elmo-global-flag-list)) + (defun elmo-flag-folder-delete-message (folder number &optional keep-referrer) (let* ((elem (elmo-get-hash-val (concat "#" (number-to-string number)) diff --git a/elmo/elmo-internal.el b/elmo/elmo-internal.el index 4de1308..ae489ea 100644 --- a/elmo/elmo-internal.el +++ b/elmo/elmo-internal.el @@ -70,17 +70,25 @@ (luna-define-method elmo-folder-list-subfolders ((folder elmo-internal-folder) &optional one-level) - (mapcar - (lambda (x) - (if (elmo-folder-have-subfolder-p - (elmo-make-folder - (concat (elmo-folder-prefix-internal folder) - (symbol-name x)))) - (list (concat (elmo-folder-prefix-internal folder) - (symbol-name x))) - (concat (elmo-folder-prefix-internal folder) - (symbol-name x)))) - elmo-internal-folder-list)) + (if one-level + (mapcar + (lambda (x) + (let ((name (concat (elmo-folder-prefix-internal folder) + (symbol-name x)))) + (if (elmo-folder-have-subfolder-p (elmo-make-folder name)) + (list name) + name))) + elmo-internal-folder-list) + (apply #'nconc + (mapcar + (lambda (x) + (let* ((name (concat (elmo-folder-prefix-internal folder) + (symbol-name x))) + (subfolder (elmo-make-folder name))) + (if (elmo-folder-have-subfolder-p subfolder) + (elmo-folder-list-subfolders subfolder) + (list name)))) + elmo-internal-folder-list)))) (require 'product) (product-provide (provide 'elmo-internal) (require 'elmo-version)) diff --git a/elmo/elmo-sendlog.el b/elmo/elmo-sendlog.el index 937d2a1..f0ce85b 100644 --- a/elmo/elmo-sendlog.el +++ b/elmo/elmo-sendlog.el @@ -135,6 +135,9 @@ (luna-define-method elmo-message-file-p ((folder elmo-sendlog-folder) number) t) +(luna-define-method elmo-folder-have-subfolder-p ((folder elmo-sendlog-folder)) + nil) + (require 'product) (product-provide (provide 'elmo-sendlog) (require 'elmo-version))