diff options
author | Peter S Galbraith <psg@debian.org> | 2010-05-19 08:23:40 -0400 |
---|---|---|
committer | Peter S Galbraith <psg@debian.org> | 2010-05-19 08:23:40 -0400 |
commit | b59ee24dfb243e087c09abe66638480491c0ba18 (patch) | |
tree | 97a2e1c1531316a946de644744daea5548ab3a70 /lisp/mh-e | |
parent | ead6f8f50b3d538902ad33421973be783cbea969 (diff) | |
download | emacs-b59ee24dfb243e087c09abe66638480491c0ba18.tar.gz |
Decode RFC2047 encoded Subject lines for mail replies.
Diffstat (limited to 'lisp/mh-e')
-rw-r--r-- | lisp/mh-e/ChangeLog | 7 | ||||
-rw-r--r-- | lisp/mh-e/mh-comp.el | 3 | ||||
-rw-r--r-- | lisp/mh-e/mh-mime.el | 9 |
3 files changed, 19 insertions, 0 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index e3c9599b873..29a49c45a38 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -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. diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index 3bb1e343253..762aad86080 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -905,6 +905,9 @@ letter." (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) diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index a60f31e3ac2..8d47af40ebd 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -508,6 +508,15 @@ decoding the same message multiple times." (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 |