From: yamaoka Date: Tue, 6 Jun 2000 11:20:40 +0000 (+0000) Subject: (message-save-drafts): Rewrite. X-Git-Tag: t-gnus-6_14_4-04~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=2406749feb10fa5d587d9d97be557ae0b93990c5;p=elisp%2Fgnus.git- (message-save-drafts): Rewrite. --- diff --git a/ChangeLog b/ChangeLog index 2bbc17a..b5a8b6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2000-06-06 Katsumi Yamaoka + * lisp/message.el (message-save-drafts): Rewrite. + +2000-06-06 Katsumi Yamaoka + * lisp/gnus-vers.el (gnus-revision-number): Increment to 03. * lisp/message.el (message-fix-before-sending): Don't check for diff --git a/lisp/message.el b/lisp/message.el index 5dcefef..8597e96 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -5380,23 +5380,19 @@ regexp varstr." (let ((minibuffer-setup-hook 'mail-abbrev-minibuffer-setup-hook)) (read-string prompt))) -(defvar message-save-buffer " *encoding") (defun message-save-drafts () + "Postponing the message." (interactive) - (if (not (get-buffer message-save-buffer)) - (get-buffer-create message-save-buffer)) - (let ((filename buffer-file-name) - (buffer (current-buffer)) - (reply-headers message-reply-headers)) - (set-buffer message-save-buffer) - (erase-buffer) - (insert-buffer buffer) - (setq message-reply-headers reply-headers) - (message-generate-headers '((optional . In-Reply-To))) - (mime-edit-translate-buffer) - (write-region (point-min) (point-max) filename) - (set-buffer buffer) - (set-buffer-modified-p nil))) + (message "Saving %s..." buffer-file-name) + (let ((reply-headers message-reply-headers) + (msg (buffer-substring-no-properties (point-min) (point-max)))) + (with-temp-file buffer-file-name + (insert msg) + (setq message-reply-headers reply-headers) + (message-generate-headers '((optional . In-Reply-To))) + (mime-edit-translate-buffer)) + (set-buffer-modified-p nil)) + (message "Saving %s...done" buffer-file-name)) (provide 'message)