diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/gnus/ChangeLog | 7 | ||||
-rw-r--r-- | lisp/gnus/mm-decode.el | 27 |
2 files changed, 12 insertions, 22 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 4eee8bcbbf..77a600427e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,10 @@ +2005-01-20 Katsumi Yamaoka <[email protected]> + + * mm-decode.el (mm-insert-part): Switch the multibyteness of data + which will be inserted according to the multibyteness of a buffer + rather than the type of contents. Suggested by ARISAWA Akihiro + <[email protected]>. + 2005-01-05 Reiner Steib <[email protected]> * spam.el (spam-face): New face. Don't use `gnus-splash-face' diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index b167ea7d10..569890b809 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1,5 +1,5 @@ ;;; mm-decode.el --- Functions for decoding MIME things -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <[email protected]> @@ -1032,27 +1032,10 @@ external if displayed external." (defun mm-insert-part (handle) "Insert the contents of HANDLE in the current buffer." - (let ((cur (current-buffer))) - (save-excursion - (if (member (mm-handle-media-supertype handle) '("text" "message")) - (with-temp-buffer - (insert-buffer-substring (mm-handle-buffer handle)) - (prog1 - (mm-decode-content-transfer-encoding - (mm-handle-encoding handle) - (mm-handle-media-type handle)) - (let ((temp (current-buffer))) - (set-buffer cur) - (insert-buffer-substring temp)))) - (mm-with-unibyte-buffer - (insert-buffer-substring (mm-handle-buffer handle)) - (prog1 - (mm-decode-content-transfer-encoding - (mm-handle-encoding handle) - (mm-handle-media-type handle)) - (let ((temp (current-buffer))) - (set-buffer cur) - (insert-buffer-substring temp)))))))) + (save-excursion + (insert (if (mm-multibyte-p) + (mm-string-as-multibyte (mm-get-part handle)) + (mm-get-part handle))))) (defun mm-file-name-delete-whitespace (file-name) "Remove all whitespace characters from FILE-NAME." |