Mercurial > emacs
changeset 108698:7be123ae7612
Decode RFC2047 encoded Subject lines for mail replies.
author | Peter S Galbraith <psg@debian.org> |
---|---|
date | Wed, 19 May 2010 08:23:40 -0400 |
parents | ba70090bc778 |
children | 69ac0d220a1c |
files | lisp/mh-e/ChangeLog lisp/mh-e/mh-comp.el lisp/mh-e/mh-mime.el |
diffstat | 3 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mh-e/ChangeLog Wed May 19 10:22:41 2010 +0300 +++ b/lisp/mh-e/ChangeLog Wed May 19 08:23:40 2010 -0400 @@ -1,3 +1,10 @@ +2010-05-14 Peter S Galbraith <psg@debian.org> + + * mh-mime.el (mh-decode-message-subject): New function to decode + RFC2047 encoded Subject lines. Used for reply drafts. + * mh-comp.el (mh-compose-and-send-mail): Call + `mh-decode-message-subject' on (reply or forward) message drafts. + 2010-05-07 Chong Yidong <cyd@stupidchicken.com> * Version 23.2 released.
--- a/lisp/mh-e/mh-comp.el Wed May 19 10:22:41 2010 +0300 +++ b/lisp/mh-e/mh-comp.el Wed May 19 08:23:40 2010 -0400 @@ -905,6 +905,9 @@ (mh-identity-make-menu) (mh-identity-add-menu) + ;; Cleanup possibly RFC2047 encoded subject header + (mh-decode-message-subject) + ;; Insert extra fields. (mh-insert-x-mailer) (mh-insert-x-face)
--- a/lisp/mh-e/mh-mime.el Wed May 19 10:22:41 2010 +0300 +++ b/lisp/mh-e/mh-mime.el Wed May 19 08:23:40 2010 -0400 @@ -508,6 +508,15 @@ (rfc2047-decode-region (point-min) (mh-mail-header-end))))) ;;;###mh-autoload +(defun mh-decode-message-subject () + "Decode RFC2047 encoded message header fields." + (when mh-decode-mime-flag + (save-excursion + (let ((buffer-read-only nil)) + (rfc2047-decode-region (progn (mh-goto-header-field "subject:") (point)) + (progn (mh-header-field-end) (point))))))) + +;;;###mh-autoload (defun mh-mime-display (&optional pre-dissected-handles) "Display (and possibly decode) MIME handles. Optional argument, PRE-DISSECTED-HANDLES is a list of MIME