From c79686f318fac9113068a63a9fe2a4b985503e4e Mon Sep 17 00:00:00 2001 From: yoichi Date: Sun, 20 Aug 2006 14:51:00 +0000 Subject: [PATCH] * elmo-archive.el (elmo-archive-folder-append-buffer): Remove meaningless unwind-protect. --- elmo/ChangeLog | 3 +++ elmo/elmo-archive.el | 35 +++++++++++++++++------------------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index b8349a4..4d4b96f 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,8 @@ 2006-08-20 Yoichi NAKAYAMA + * elmo-archive.el (elmo-archive-folder-append-buffer): Remove + meaningless unwind-protect. + * elmo-maildir.el (elmo-folder-message-make-temp-files): Respect start-number correctly. * elmo-search.el (elmo-folder-message-make-temp-files): Ditto. diff --git a/elmo/elmo-archive.el b/elmo/elmo-archive.el index a9d22e3..c9387dd 100644 --- a/elmo/elmo-archive.el +++ b/elmo/elmo-archive.el @@ -604,25 +604,24 @@ TYPE specifies the archiver's symbol." (setq newfile (elmo-concat-path prefix (int-to-string next-num))) - (unwind-protect - (elmo-bind-directory - tmp-dir - (if (and (or (functionp method) (car method)) - (file-writable-p newfile)) - (progn - (setq dst-buffer (current-buffer)) - (with-current-buffer src-buffer - (copy-to-buffer dst-buffer (point-min) (point-max))) - (as-binary-output-file + (elmo-bind-directory + tmp-dir + (if (and (or (functionp method) (car method)) + (file-writable-p newfile)) + (progn + (setq dst-buffer (current-buffer)) + (with-current-buffer src-buffer + (copy-to-buffer dst-buffer (point-min) (point-max))) + (as-binary-output-file (write-region (point-min) (point-max) newfile nil 'no-msg)) - (when (elmo-archive-call-method method (list arc newfile)) - (elmo-folder-preserve-flags - folder - (with-current-buffer src-buffer - (elmo-msgdb-get-message-id-from-buffer)) - flags) - t)) - nil)))))) + (when (elmo-archive-call-method method (list arc newfile)) + (elmo-folder-preserve-flags + folder + (with-current-buffer src-buffer + (elmo-msgdb-get-message-id-from-buffer)) + flags) + t)) + nil))))) (luna-define-method elmo-folder-append-messages :around ((folder elmo-archive-folder) src-folder numbers &optional same-number) -- 1.7.10.4