changeset 47887:d347ebc48f79

(sendmail-send-it): Call select-message-coding-system before changing the current bufer to " sendmail temp".
author Kenichi Handa <handa@m17n.org>
date Tue, 15 Oct 2002 01:09:45 +0000
parents 02c982b64945
children 91409c579766
files lisp/mail/sendmail.el
diffstat 1 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/sendmail.el	Mon Oct 14 22:20:42 2002 +0000
+++ b/lisp/mail/sendmail.el	Tue Oct 15 01:09:45 2002 +0000
@@ -817,9 +817,7 @@
 	(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 @@
 	  (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 @@
 		   (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 @@
 \\|^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