diff options
| author | Peter S Galbraith | 2010-05-19 08:23:40 -0400 |
|---|---|---|
| committer | Peter S Galbraith | 2010-05-19 08:23:40 -0400 |
| commit | b59ee24dfb243e087c09abe66638480491c0ba18 (patch) | |
| tree | 97a2e1c1531316a946de644744daea5548ab3a70 | |
| parent | ead6f8f50b3d538902ad33421973be783cbea969 (diff) | |
| download | emacs-b59ee24dfb243e087c09abe66638480491c0ba18.tar.gz emacs-b59ee24dfb243e087c09abe66638480491c0ba18.zip | |
Decode RFC2047 encoded Subject lines for mail replies.
| -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 @@ | |||
| 1 | 2010-05-14 Peter S Galbraith <psg@debian.org> | ||
| 2 | |||
| 3 | * mh-mime.el (mh-decode-message-subject): New function to decode | ||
| 4 | RFC2047 encoded Subject lines. Used for reply drafts. | ||
| 5 | * mh-comp.el (mh-compose-and-send-mail): Call | ||
| 6 | `mh-decode-message-subject' on (reply or forward) message drafts. | ||
| 7 | |||
| 1 | 2010-05-07 Chong Yidong <cyd@stupidchicken.com> | 8 | 2010-05-07 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 9 | ||
| 3 | * Version 23.2 released. | 10 | * 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." | |||
| 905 | (mh-identity-make-menu) | 905 | (mh-identity-make-menu) |
| 906 | (mh-identity-add-menu) | 906 | (mh-identity-add-menu) |
| 907 | 907 | ||
| 908 | ;; Cleanup possibly RFC2047 encoded subject header | ||
| 909 | (mh-decode-message-subject) | ||
| 910 | |||
| 908 | ;; Insert extra fields. | 911 | ;; Insert extra fields. |
| 909 | (mh-insert-x-mailer) | 912 | (mh-insert-x-mailer) |
| 910 | (mh-insert-x-face) | 913 | (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." | |||
| 508 | (rfc2047-decode-region (point-min) (mh-mail-header-end))))) | 508 | (rfc2047-decode-region (point-min) (mh-mail-header-end))))) |
| 509 | 509 | ||
| 510 | ;;;###mh-autoload | 510 | ;;;###mh-autoload |
| 511 | (defun mh-decode-message-subject () | ||
| 512 | "Decode RFC2047 encoded message header fields." | ||
| 513 | (when mh-decode-mime-flag | ||
| 514 | (save-excursion | ||
| 515 | (let ((buffer-read-only nil)) | ||
| 516 | (rfc2047-decode-region (progn (mh-goto-header-field "subject:") (point)) | ||
| 517 | (progn (mh-header-field-end) (point))))))) | ||
| 518 | |||
| 519 | ;;;###mh-autoload | ||
| 511 | (defun mh-mime-display (&optional pre-dissected-handles) | 520 | (defun mh-mime-display (&optional pre-dissected-handles) |
| 512 | "Display (and possibly decode) MIME handles. | 521 | "Display (and possibly decode) MIME handles. |
| 513 | Optional argument, PRE-DISSECTED-HANDLES is a list of MIME | 522 | Optional argument, PRE-DISSECTED-HANDLES is a list of MIME |