changeset 93107:3bf6293f3041

(mm-copy-to-buffer): Use mm-set-buffer-multibyte.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 20 Mar 2008 15:49:10 +0000
parents e931cb410f95
children 695900050c0b
files lisp/gnus/ChangeLog lisp/gnus/mm-decode.el
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Thu Mar 20 15:47:15 2008 +0000
+++ b/lisp/gnus/ChangeLog	Thu Mar 20 15:49:10 2008 +0000
@@ -1,6 +1,7 @@
 2008-03-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* mm-util.el (mm-set-buffer-multibyte): New function.
+	* mm-decode.el (mm-copy-to-buffer): Use it.
 
 	* gnus-win.el (gnus-configure-frame, gnus-all-windows-visible-p):
 	Prefer fboundp to functionp so it works with macros as well.
--- a/lisp/gnus/mm-decode.el	Thu Mar 20 15:47:15 2008 +0000
+++ b/lisp/gnus/mm-decode.el	Thu Mar 20 15:49:10 2008 +0000
@@ -664,14 +664,15 @@
 (defun mm-copy-to-buffer ()
   "Copy the contents of the current buffer to a fresh buffer."
   (let ((obuf (current-buffer))
+        (mb (mm-multibyte-p))
         beg)
     (goto-char (point-min))
     (search-forward-regexp "^\n" nil t)
     (setq beg (point))
     (with-current-buffer
-       ;; Preserve the data's unibyteness (for url-insert-file-contents).
-       (let ((default-enable-multibyte-characters (mm-multibyte-p)))
-          (generate-new-buffer " *mm*"))
+          (generate-new-buffer " *mm*")
+      ;; Preserve the data's unibyteness (for url-insert-file-contents).
+      (mm-set-buffer-multibyte mb)
       (insert-buffer-substring obuf beg)
       (current-buffer))))