From a80d729082f3020956b6e260f8edd9f93c1a6551 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 15 Oct 2002 01:10:03 +0000 Subject: [PATCH] (sendmail-send-it): Call select-message-coding-system before changing the current bufer to " sendmail temp". --- lisp/ChangeLog | 6 ++++++ lisp/mail/sendmail.el | 11 +++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 55cd8fec7d0..847eb31b16e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2002-10-15 Kenichi Handa + + * mail/sendmail.el (sendmail-send-it): Call + select-message-coding-system before changing the current bufer to + " sendmail temp". + 2002-10-14 Andre Spiegel * files.el (insert-directory): Handle //SUBDIRED// lines in diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 6be03ee439c..a3ec7f836e0 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -817,9 +817,7 @@ external program defined by `sendmail-program'." (tembuf (generate-new-buffer " sendmail temp")) (multibyte enable-multibyte-characters) (case-fold-search nil) - (coding (and (local-variable-p 'buffer-file-coding-system) - buffer-file-coding-system)) - selected-coding + (selected-coding (select-message-coding-system)) ;;; resend-to-addresses delimline fcc-was-found @@ -839,7 +837,6 @@ external program defined by `sendmail-program'." (unless multibyte (set-buffer-multibyte nil)) (insert-buffer-substring mailbuf) - (set-buffer-file-coding-system coding) (goto-char (point-max)) ;; require one newline at the end. (or (= (preceding-char) ?\n) @@ -963,7 +960,7 @@ external program defined by `sendmail-program'." (not (re-search-forward "^MIME-version:" delimline t)) (progn (skip-chars-forward "\0-\177") (/= (point) (point-max))) - (setq selected-coding (select-message-coding-system)) + selected-coding (setq charset (coding-system-get selected-coding 'mime-charset)) (goto-char delimline) @@ -992,9 +989,7 @@ external program defined by `sendmail-program'." \\|^resent-cc:\\|^resent-bcc:" delimline t)) (let* ((default-directory "/") - (coding-system-for-write - (or selected-coding - (select-message-coding-system))) + (coding-system-for-write selected-coding) (args (append (list (point-min) (point-max) program -- 2.39.2