summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mail/rmail.el10
2 files changed, 14 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 37286d0780c..401f1f4f540 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-31 Eli Zaretskii <eliz@gnu.org>
+
+ * mail/rmail.el (rmail-show-message-1): Decode any RFC2047 encoded
+ headers of non-MIME messages, when rmail-enable-mime is non-nil.
+
2011-12-29 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-find-shell): Set "remote-shell" property
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 1ea01bdadb8..2c94cfdf212 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -2773,7 +2773,15 @@ The current mail message becomes the message displayed."
(forward-line))
(goto-char (point-min)))
;; Copy the headers to the front of the message view buffer.
- (rmail-copy-headers beg end))
+ (rmail-copy-headers beg end)
+ ;; Decode any RFC2047 encoded message headers.
+ (if rmail-enable-mime
+ (with-current-buffer rmail-view-buffer
+ (rfc2047-decode-region
+ (point-min)
+ (progn
+ (search-forward "\n\n" nil 'move)
+ (point))))))
;; highlight the message, activate any URL like text and add
;; special highlighting for and quoted material.
(with-current-buffer rmail-view-buffer