From d3432fbe64b20e3a8bc457de72641abc81fd87cd Mon Sep 17 00:00:00 2001 From: Alex Schroeder <alex@gnu.org> Date: Sat, 21 Jan 2006 21:58:52 +0000 Subject: [PATCH] (rmail-decode-messages): Decoded encoded-words in Subject and From header. (rmail-process-new-messages): Don't decode encoded words here. --- lisp/mail/rmail.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 77cb5f0ab45..ee06e500067 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -1750,10 +1750,9 @@ is non-nil if the user has supplied the password interactively. (delete-char 1))) (setq end (marker-position end-marker)) (set-marker end-marker nil))) - ;; Decode message according to its content type. + ;; Figure out the encoding by looking at the MIME header and + ;; decode the message. (setq last-coding-system-used nil) - ;; (or rmail-enable-mime - ;; (not rmail-enable-multibyte) (when (and (not rmail-enable-mime) rmail-enable-multibyte) (let ((mime-charset (when (and rmail-decode-mime-charset @@ -1765,6 +1764,11 @@ is non-nil if the user has supplied the password interactively. (point-min) t)))) (intern (downcase (match-string 1)))))) (rmail-decode-region start (point) mime-charset))) + ;; encoded-words in from and subject + (dolist (header '("Subject" "From")) + (let ((value (rmail-header-get-header header))) + (rmail-header-add-header + header (mail-decode-encoded-word-string value)))) ;; Add an the X-Coding-System header. (unless (rmail-header-get-header "X-Coding-System") (let ((val (symbol-name last-coding-system-used))) @@ -2011,9 +2015,8 @@ non-nil then do not show any progress messages." (count-lines start end) (cadr (mail-extract-address-components (rmail-header-get-header "from"))) - (mail-decode-encoded-word-string - (or (rmail-header-get-header "subject") - "No Subject Given")))) + (or (rmail-header-get-header "subject") + "none"))) message-descriptor-list))))) ;; Add the new message data lists to the Rmail message descriptor ;; vector. -- 2.39.5