# HG changeset patch # User Stefan Monnier # Date 1205348079 0 # Node ID ca2ba2a312f0cd364dae60cd11f2586b3b04b150 # Parent 3637573105bd75cd5fe50a89644cea209cdfe3b3 (mm-uu-copy-to-buffer): Preserve (uni/multi)byteness. (mm-uu-yenc-extract): Use with-current-buffer. diff -r 3637573105bd -r ca2ba2a312f0 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Wed Mar 12 18:49:53 2008 +0000 +++ b/lisp/gnus/ChangeLog Wed Mar 12 18:54:39 2008 +0000 @@ -1,5 +1,8 @@ 2008-03-12 Stefan Monnier + * mm-uu.el (mm-uu-copy-to-buffer): Preserve (uni/multi)byteness. + (mm-uu-yenc-extract): Use with-current-buffer. + * gnus-soup.el (gnus-soup-send-packet): Don't use mm-with-unibyte-current-buffer since the buffer is unibyte anyway. diff -r 3637573105bd -r ca2ba2a312f0 lisp/gnus/mm-uu.el --- a/lisp/gnus/mm-uu.el Wed Mar 12 18:49:53 2008 +0000 +++ b/lisp/gnus/mm-uu.el Wed Mar 12 18:54:39 2008 +0000 @@ -280,11 +280,14 @@ see `set-text-properties'. If PROPERTIES equals t, this means to apply the face `mm-uu-extract'." (let ((obuf (current-buffer)) + (multi (and (boundp 'enable-multibyte-characters) + enable-multibyte-characters)) (coding-system ;; Might not exist in non-MULE XEmacs (when (boundp 'buffer-file-coding-system) buffer-file-coding-system))) (with-current-buffer (generate-new-buffer " *mm-uu*") + (if multi (mm-enable-multibyte) (mm-disable-multibyte)) (setq buffer-file-coding-system coding-system) (insert-buffer-substring obuf from to) (cond ((eq properties t) @@ -441,8 +444,7 @@ ;; This might not be exactly correct, but we sure can't get the ;; binary data from the article buffer, since that's already in a ;; non-binary charset. So get it from the original article buffer. - (mm-make-handle (save-excursion - (set-buffer gnus-original-article-buffer) + (mm-make-handle (with-current-buffer gnus-original-article-buffer (mm-uu-copy-to-buffer start-point end-point)) (list (or (and file-name (string-match "\\.[^\\.]+$" file-name)