From 7f48b955f3b8da23ddcf1e76c38790867ce8b635 Mon Sep 17 00:00:00 2001 From: teranisi Date: Wed, 12 Dec 2001 16:35:37 +0000 Subject: [PATCH] * wl-summary.el (wl-summary-save-view): Removed unused argument. (wl-summary-exit): Follow the change above. (wl-summary-goto-folder-subr): Ditto. * wl-folder.el (wl-folder-create-subr): Don't use `elmo-folder-creatable-p'. * elmo-shimbun.el (elmo-folder-creatable-p): Define. --- elmo/ChangeLog | 4 ++++ elmo/elmo-shimbun.el | 3 +++ wl/ChangeLog | 9 +++++++++ wl/wl-folder.el | 24 +++++++++++------------- wl/wl-summary.el | 12 +++++------- 5 files changed, 32 insertions(+), 20 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 54adbc0..4afca3b 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,7 @@ +2001-12-13 Yuuichi Teranishi + + * elmo-shimbun.el (elmo-folder-creatable-p): Define. + 2001-12-12 Yuuichi Teranishi * elmo-localdir.el (elmo-folder-message-make-temp-files): Use diff --git a/elmo/elmo-shimbun.el b/elmo/elmo-shimbun.el index b690aba..06eab4b 100644 --- a/elmo/elmo-shimbun.el +++ b/elmo/elmo-shimbun.el @@ -251,6 +251,9 @@ update overview when message is fetched." number) elmo-shimbun-use-cache) +(luna-define-method elmo-folder-creatable-p ((folder elmo-shimbun-folder)) + nil) + (luna-define-method elmo-folder-close-internal :after ((folder elmo-shimbun-folder)) (shimbun-close-group diff --git a/wl/ChangeLog b/wl/ChangeLog index b9e2041..823428f 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,12 @@ +2001-12-13 Yuuichi Teranishi + + * wl-summary.el (wl-summary-save-view): Removed unused argument. + (wl-summary-exit): Follow the change above. + (wl-summary-goto-folder-subr): Ditto. + + * wl-folder.el (wl-folder-create-subr): Don't use + `elmo-folder-creatable-p'. + 2001-12-12 Yuuichi Teranishi * wl-demo.el (wl-demo-icon-name): Use X'mas logo on Dec 25 too. diff --git a/wl/wl-folder.el b/wl/wl-folder.el index c2e374c..0086d1a 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -2767,19 +2767,17 @@ Call `wl-summary-write-current-folder' with current folder name." (kill-buffer bufname)))) (defun wl-folder-create-subr (folder) - (if (not (elmo-folder-creatable-p folder)) - (error "Folder %s is not found" (elmo-folder-name-internal folder)) - (if (y-or-n-p - (format "Folder %s does not exist, create it?" - (elmo-folder-name-internal folder))) - (progn - (setq wl-folder-entity-hashtb - (wl-folder-create-entity-hashtb - (elmo-folder-name-internal folder) - wl-folder-entity-hashtb)) - (unless (elmo-folder-create folder) - (error "Create folder failed"))) - (error "Folder %s is not created" (elmo-folder-name-internal folder))))) + (if (y-or-n-p (format "Folder %s does not exist, create it?" + (elmo-folder-name-internal folder))) + (progn + (message "") + (setq wl-folder-entity-hashtb + (wl-folder-create-entity-hashtb + (elmo-folder-name-internal folder) + wl-folder-entity-hashtb)) + (unless (elmo-folder-create folder) + (error "Create folder failed"))) + (error "Folder %s is not created" (elmo-folder-name-internal folder)))) (defun wl-folder-confirm-existence (folder &optional force) (if force diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 68d1356..5c86d0f 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -996,7 +996,7 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'." ;; a subroutine for wl-summary-exit/wl-save-status ;; Note that folder is not commited here. -(defun wl-summary-save-view (&optional sticky) +(defun wl-summary-save-view () ;; already in summary buffer. (when wl-summary-buffer-persistent ;; save the current summary buffer view. @@ -1026,12 +1026,11 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'." (unwind-protect ;; save summary status (progn - (if (or force-exit - (not sticky)) + (if (or force-exit (not sticky)) (elmo-folder-close wl-summary-buffer-elmo-folder) (elmo-folder-commit wl-summary-buffer-elmo-folder) (elmo-folder-check wl-summary-buffer-elmo-folder)) - (wl-summary-save-view sticky) + (wl-summary-save-view) (if wl-use-scoring (wl-score-save))) ;; for sticky summary (wl-delete-all-overlays) @@ -2494,14 +2493,13 @@ If ARG, without confirm." (setq name wl-default-folder)) (setq folder (wl-folder-get-elmo-folder name)) (when (and (not (string= - (and cur-fld - (elmo-folder-name-internal cur-fld)) + (and cur-fld (elmo-folder-name-internal cur-fld)) (elmo-folder-name-internal folder))) ; folder is moved. (eq major-mode 'wl-summary-mode)) ; called in summary. (setq wl-summary-last-visited-folder (wl-summary-buffer-folder-name)) (run-hooks 'wl-summary-exit-pre-hook) (wl-summary-cleanup-temp-marks (wl-summary-sticky-p)) - (wl-summary-save-view 'keep) ; keep current buffer, anyway. + (wl-summary-save-view) (elmo-folder-commit wl-summary-buffer-elmo-folder)) (setq buf (wl-summary-get-buffer-create (elmo-folder-name-internal folder) sticky)) -- 1.7.10.4