From 1694e6c1bb59c4080f170ce6d18fe5e9ed6ba27d Mon Sep 17 00:00:00 2001
From: "Richard M. Stallman" <rms@gnu.org>
Date: Sat, 10 Mar 2012 04:11:22 -0500
Subject: [PATCH] sendmail mode quoting bug fix.

---
 lisp/ChangeLog        | 3 +++
 lisp/mail/sendmail.el | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1d225b9cd81..bda91a16883 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
 2012-03-10  Richard Stallman  <rms@gnu.org>
 
+	* mail/sendmail.el (mail-encode-header):
+	Set rfc2047-encode-encoded-words.
+
 	* mail/mail-utils.el (mail-quote-printable): Quote multibyte chars.
 
 	* mail/rmail.el (rmail-buffers-swapped-p): Don't assume dead
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 91e0b183a68..f4dfcfcf647 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1085,7 +1085,9 @@ Return non-nil if and only if some part of the header is encoded."
 		(cons selected mm-coding-system-priorities)
 	      mm-coding-system-priorities))
 	   (tick (buffer-chars-modified-tick))
-	   (rfc2047-encode-encoded-words nil))
+	   ;; rms: this proved necessary, but I don't recall why.
+	   ;; Can anyone determine why, and state it here?
+	   (rfc2047-encode-encoded-words t))
       (rfc2047-encode-message-header)
       (= tick (buffer-chars-modified-tick)))))
 
-- 
2.39.5