From 8d43f3cd8a2585eef72bedd0061dd8c1d66ae17c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 31 Dec 2011 12:06:21 +0200 Subject: [PATCH] Decode message headers of non-MIME messages in Rmail. lisp/mail/rmail.el (rmail-show-message-1): Decode any RFC2047 encoded headers of non-MIME messages, when rmail-enable-mime is non-nil. --- lisp/ChangeLog | 5 +++++ lisp/mail/rmail.el | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) 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 + + * 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 * 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 -- 2.11.4.GIT