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-14 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * 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 <lapis-lazuli@pop06.odn.ne.jp>
* elmo.el (elmo-folder-set-info-max-by-numdb): Don't use `sort' to
(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))
(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))
(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))