aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2008-03-20 15:49:10 +0000
committerStefan Monnier2008-03-20 15:49:10 +0000
commit61dc89b03c0819a8f567f96bf895a1cc69619acc (patch)
treec4da8bcc101bfedbdaffc941ea99df69804143da
parentdf06dd59a6401095be74a9d4eb763495e2414edd (diff)
downloademacs-61dc89b03c0819a8f567f96bf895a1cc69619acc.tar.gz
emacs-61dc89b03c0819a8f567f96bf895a1cc69619acc.zip
(mm-copy-to-buffer): Use mm-set-buffer-multibyte.
-rw-r--r--lisp/gnus/ChangeLog1
-rw-r--r--lisp/gnus/mm-decode.el7
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 @@
12008-03-20 Stefan Monnier <monnier@iro.umontreal.ca> 12008-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * mm-util.el (mm-set-buffer-multibyte): New function. 3 * mm-util.el (mm-set-buffer-multibyte): New function.
4 * mm-decode.el (mm-copy-to-buffer): Use it.
4 5
5 * gnus-win.el (gnus-configure-frame, gnus-all-windows-visible-p): 6 * gnus-win.el (gnus-configure-frame, gnus-all-windows-visible-p):
6 Prefer fboundp to functionp so it works with macros as well. 7 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
664(defun mm-copy-to-buffer () 664(defun mm-copy-to-buffer ()
665 "Copy the contents of the current buffer to a fresh buffer." 665 "Copy the contents of the current buffer to a fresh buffer."
666 (let ((obuf (current-buffer)) 666 (let ((obuf (current-buffer))
667 (mb (mm-multibyte-p))
667 beg) 668 beg)
668 (goto-char (point-min)) 669 (goto-char (point-min))
669 (search-forward-regexp "^\n" nil t) 670 (search-forward-regexp "^\n" nil t)
670 (setq beg (point)) 671 (setq beg (point))
671 (with-current-buffer 672 (with-current-buffer
672 ;; Preserve the data's unibyteness (for url-insert-file-contents). 673 (generate-new-buffer " *mm*")
673 (let ((default-enable-multibyte-characters (mm-multibyte-p))) 674 ;; Preserve the data's unibyteness (for url-insert-file-contents).
674 (generate-new-buffer " *mm*")) 675 (mm-set-buffer-multibyte mb)
675 (insert-buffer-substring obuf beg) 676 (insert-buffer-substring obuf beg)
676 (current-buffer)))) 677 (current-buffer))))
677 678