diff options
| author | Eli Zaretskii | 2006-10-07 13:13:34 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-10-07 13:13:34 +0000 |
| commit | 4baf35c9a6447dc93b3e359c2a6dc02115dd2490 (patch) | |
| tree | a047a59b6d2e83c14923d90e7db25e7f832ed166 | |
| parent | 857b15e99850cad4610bfc89fe2dd7006bc88f9f (diff) | |
| download | emacs-4baf35c9a6447dc93b3e359c2a6dc02115dd2490.tar.gz emacs-4baf35c9a6447dc93b3e359c2a6dc02115dd2490.zip | |
(rmail-redecode-body): If the old encoding is `undecided', call
find-coding-systems-region to find a proper non-trivial encoding.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/mail/rmail.el | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index afafe3d2204..6093b1c907b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-10-07 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * mail/rmail.el (rmail-redecode-body): If the old encoding is | ||
| 4 | `undecided', call find-coding-systems-region to find a proper | ||
| 5 | non-trivial encoding. | ||
| 6 | |||
| 1 | 2006-10-07 Kevin Ryde <user42@zip.com.au> | 7 | 2006-10-07 Kevin Ryde <user42@zip.com.au> |
| 2 | 8 | ||
| 3 | * textmodes/reftex-vars.el (defgroup reftex): Update home page | 9 | * textmodes/reftex-vars.el (defgroup reftex): Update home page |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 473175e142b..b196d906f81 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -2875,6 +2875,12 @@ iso-8859, koi8-r, etc." | |||
| 2875 | (coding-system-change-eol-conversion | 2875 | (coding-system-change-eol-conversion |
| 2876 | coding | 2876 | coding |
| 2877 | (coding-system-eol-type old-coding))) | 2877 | (coding-system-eol-type old-coding))) |
| 2878 | ;; If old-coding is `undecided', encode-coding-region | ||
| 2879 | ;; will not encode the text at all. Find a proper | ||
| 2880 | ;; non-trivial encoding to use. | ||
| 2881 | (if (memq (coding-system-base old-coding) '(nil undecided)) | ||
| 2882 | (setq old-coding | ||
| 2883 | (car (find-coding-systems-region msgbeg msgend)))) | ||
| 2878 | (setq x-coding-header (point-marker)) | 2884 | (setq x-coding-header (point-marker)) |
| 2879 | (narrow-to-region msgbeg msgend) | 2885 | (narrow-to-region msgbeg msgend) |
| 2880 | (encode-coding-region (point) msgend old-coding) | 2886 | (encode-coding-region (point) msgend old-coding) |