From 61dc89b03c0819a8f567f96bf895a1cc69619acc Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 20 Mar 2008 15:49:10 +0000 Subject: [PATCH] (mm-copy-to-buffer): Use mm-set-buffer-multibyte. --- lisp/gnus/ChangeLog | 1 + lisp/gnus/mm-decode.el | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index e31324b1f25..83f18444e52 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,6 +1,7 @@ 2008-03-20 Stefan Monnier * 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. diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 331174ef2cf..1125492fc7e 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -664,14 +664,15 @@ Postpone undisplaying of viewers for types in (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)))) -- 2.11.4.GIT