From: yoichi Date: Mon, 20 Sep 2004 05:14:13 +0000 (+0000) Subject: * elmo-nmz.el (elmo-folder-initialize): Enable "[" for access X-Git-Tag: wl-2_12-root~93 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b8f6c409eec8e67b3a74d0629d9c01d0f358a691;p=elisp%2Fwanderlust.git * elmo-nmz.el (elmo-folder-initialize): Enable "[" for access group entry. (elmo-folder-exists-p): "[" is empty. (elmo-folder-list-subfolders): New function. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 9a1845b..3f78034 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,10 @@ +2004-09-20 Yoichi NAKAYAMA + + * elmo-nmz.el (elmo-folder-initialize): Enable "[" for access + group entry. + (elmo-folder-exists-p): "[" is empty. + (elmo-folder-list-subfolders): New function. + 2004-09-19 Yoichi NAKAYAMA * elmo-flag.el (elmo-folder-delete): Update elmo-global-flag-list. diff --git a/elmo/elmo-nmz.el b/elmo/elmo-nmz.el index 6db859f..28b59b9 100644 --- a/elmo/elmo-nmz.el +++ b/elmo/elmo-nmz.el @@ -73,23 +73,24 @@ If the value is a list, all elements are used as index paths for namazu." (luna-define-method elmo-folder-initialize ((folder elmo-nmz-folder) name) - (with-temp-buffer - (insert "[" name) - (goto-char (point-min)) - (forward-sexp) - (elmo-nmz-folder-set-pattern-internal folder - (buffer-substring - (+ 1 (point-min)) - (- (point) 1))) - (let ((index (buffer-substring (point) (point-max)))) - (elmo-nmz-folder-set-index-path-internal - folder - (cond ((cdr (assoc index elmo-nmz-index-alias-alist))) - ((eq (length index) 0) - elmo-nmz-default-index-path) - (t - index)))) - folder)) + (when (> (length name) 0) + (with-temp-buffer + (insert "[" name) + (goto-char (point-min)) + (forward-sexp) + (elmo-nmz-folder-set-pattern-internal folder + (buffer-substring + (+ 1 (point-min)) + (- (point) 1))) + (let ((index (buffer-substring (point) (point-max)))) + (elmo-nmz-folder-set-index-path-internal + folder + (cond ((cdr (assoc index elmo-nmz-index-alias-alist))) + ((eq (length index) 0) + elmo-nmz-default-index-path) + (t + index)))))) + folder) (luna-define-method elmo-folder-expand-msgdb-path ((folder elmo-nmz-folder)) @@ -232,7 +233,14 @@ If the value is a list, all elements are used as index paths for namazu." (nreverse locations)))) (luna-define-method elmo-folder-exists-p ((folder elmo-nmz-folder)) - t) + (elmo-nmz-folder-pattern-internal folder)) + +(luna-define-method elmo-folder-list-subfolders ((folder elmo-nmz-folder) + &optional one-level) + (mapcar (lambda (name) (elmo-recover-string-from-filename name)) + (elmo-list-subdirectories (expand-file-name "nmz" + elmo-msgdb-directory) + "" t))) (require 'product) (product-provide (provide 'elmo-nmz) (require 'elmo-version))