Mercurial > emacs
changeset 93726:3e95f26e3241
(gnus-mime-replace-part): Remove unnecessary use of mm-with-multibyte.
(gnus-request-article-this-buffer): Make sure the proper decoding is used
if gnus-original-article-buffer happens to be unibyte.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 05 Apr 2008 20:12:37 +0000 |
parents | 2ca2b5f1a567 |
children | 8bfa051b51fe |
files | lisp/gnus/ChangeLog lisp/gnus/gnus-art.el |
diffstat | 2 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog Sat Apr 05 20:08:27 2008 +0000 +++ b/lisp/gnus/ChangeLog Sat Apr 05 20:12:37 2008 +0000 @@ -1,5 +1,10 @@ 2008-04-05 Stefan Monnier <monnier@iro.umontreal.ca> + * gnus-art.el (gnus-mime-replace-part): Remove unnecessary use of + mm-with-multibyte. + (gnus-request-article-this-buffer): Make sure the proper decoding is used + if gnus-original-article-buffer happens to be unibyte. + * gnus-ems.el (gnus-x-splash): Prefer mm-disable-multibyte to default-enable-multibyte-characters.
--- a/lisp/gnus/gnus-art.el Sat Apr 05 20:08:27 2008 +0000 +++ b/lisp/gnus/gnus-art.el Sat Apr 05 20:12:37 2008 +0000 @@ -4785,10 +4785,9 @@ ;; Useful if file has already been saved to disk (interactive (list - (mm-with-multibyte - (read-file-name "Replace MIME part with file: " - (or mm-default-directory default-directory) - nil nil)))) + (read-file-name "Replace MIME part with file: " + (or mm-default-directory default-directory) + nil nil))) (gnus-mime-save-part-and-strip file)) (defun gnus-mime-save-part-and-strip (&optional file) @@ -6586,7 +6585,13 @@ (with-current-buffer gnus-original-article-buffer (and (equal (car gnus-original-article) group) (eq (cdr gnus-original-article) article)))) - (insert-buffer-substring gnus-original-article-buffer) + ;; `insert-buffer-substring' would incorrectly use the + ;; equivalent of string-make-multibyte which amount to decoding + ;; with locale-coding-system, causing failure of + ;; subsequent decoding. + (insert (mm-string-to-multibyte + (with-current-buffer gnus-original-article-buffer + (buffer-substring (point-min) (point-max))))) 'article) ;; Check the backlog. ((and gnus-keep-backlog