From: teranisi Date: Sun, 23 Dec 2001 03:49:55 +0000 (+0000) Subject: * elmo.el (elmo-folder-delete): Delete msgdb path. X-Git-Tag: wl-2_9_5~71 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=66f5b4f47cfa5da62cbbda72ac37d6557355a120;p=elisp%2Fwanderlust.git * elmo.el (elmo-folder-delete): Delete msgdb path. * elmo-archive.el (elmo-folder-delete): Added `:before' qualifier. * elmo-maildir.el (elmo-folder-delete): Ditto. * elmo-localdir.el (elmo-folder-delete): Ditto. * elmo-imap4.el (elmo-folder-delete): Ditto. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 55482af..4458868 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,15 @@ +2001-12-23 Yuuichi Teranishi + + * elmo.el (elmo-folder-delete): Delete msgdb path. + + * elmo-archive.el (elmo-folder-delete): Added `:before' qualifier. + + * elmo-maildir.el (elmo-folder-delete): Ditto. + + * elmo-localdir.el (elmo-folder-delete): Ditto. + + * elmo-imap4.el (elmo-folder-delete): Ditto. + 2001-12-19 Yuuichi Teranishi * elmo.el (luna-define-class): Added `biff' slot. diff --git a/elmo/elmo-archive.el b/elmo/elmo-archive.el index 7a888be..f55cfe4 100644 --- a/elmo/elmo-archive.el +++ b/elmo/elmo-archive.el @@ -447,7 +447,7 @@ TYPE specifies the archiver's symbol." (delete-file dummy))) )))) -(luna-define-method elmo-folder-delete ((folder elmo-archive-folder)) +(luna-define-method elmo-folder-delete :before ((folder elmo-archive-folder)) (let ((arc (elmo-archive-get-archive-name folder))) (if (not (file-exists-p arc)) (error "No such file: %s" arc) diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 1f35051..8d14bf7 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -1973,7 +1973,7 @@ Return nil if no complete line has arrived." (luna-define-method elmo-folder-writable-p ((folder elmo-imap4-folder)) t) -(luna-define-method elmo-folder-delete ((folder elmo-imap4-folder)) +(luna-define-method elmo-folder-delete :before ((folder elmo-imap4-folder)) (let ((session (elmo-imap4-get-session folder)) msgs) (when (elmo-imap4-folder-mailbox-internal folder) diff --git a/elmo/elmo-localdir.el b/elmo/elmo-localdir.el index cd571ea..b1f9ef9 100644 --- a/elmo/elmo-localdir.el +++ b/elmo/elmo-localdir.el @@ -295,7 +295,7 @@ (elmo-make-directory dir)) t))) -(luna-define-method elmo-folder-delete ((folder elmo-localdir-folder)) +(luna-define-method elmo-folder-delete :before ((folder elmo-localdir-folder)) (let ((dir (elmo-localdir-folder-directory-internal folder))) (if (not (file-directory-p dir)) (error "No such directory: %s" dir) diff --git a/elmo/elmo-maildir.el b/elmo/elmo-maildir.el index 7fdae4c..ab3bf6a 100644 --- a/elmo/elmo-maildir.el +++ b/elmo/elmo-maildir.el @@ -457,7 +457,7 @@ file name for maildir directories." t) (error)))) -(luna-define-method elmo-folder-delete ((folder elmo-maildir-folder)) +(luna-define-method elmo-folder-delete :before ((folder elmo-maildir-folder)) (let ((basedir (elmo-maildir-folder-directory-internal folder))) (condition-case nil (let ((tmp-files (directory-files diff --git a/elmo/elmo.el b/elmo/elmo.el index 95a3f26..2a37231 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -148,6 +148,13 @@ If optional argument NON-PERSISTENT is non-nil, folder is treated as (save-match-data (elmo-folder-send folder 'elmo-folder-initialize name)))) +(defun elmo-create-folder (class name &rest args) + (apply + 'luna-make-entity + (intern (concat "elmo-" (symbol-name class) "-folder")) + :name name + args)) + (defmacro elmo-folder-msgdb (folder) "Return the msgdb of FOLDER (on-demand loading)." (` (or (elmo-folder-msgdb-internal (, folder)) @@ -687,6 +694,9 @@ Return a cons cell of (NUMBER-CROSSPOSTS . NEW-MARK-ALIST).") (luna-define-method elmo-folder-writable-p ((folder elmo-folder)) nil) ; default is not writable. +(luna-define-method elmo-folder-delete ((folder elmo-folder)) + (elmo-msgdb-delete-path folder)) + (luna-define-method elmo-folder-rename ((folder elmo-folder) new-name) (let* ((new-folder (elmo-make-folder new-name))) (unless (eq (elmo-folder-type-internal folder)