aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2008-03-12 18:54:39 +0000
committerStefan Monnier2008-03-12 18:54:39 +0000
commit456cace2bc9d6c62faf2bdd7b53a6ced7a04ac5c (patch)
treed25ec96743dc89ea16e336cc07a4a9fea7c78625
parentf5fcf556b25acd4597bfb191e6924f3274e5f20a (diff)
downloademacs-456cace2bc9d6c62faf2bdd7b53a6ced7a04ac5c.tar.gz
emacs-456cace2bc9d6c62faf2bdd7b53a6ced7a04ac5c.zip
(mm-uu-copy-to-buffer): Preserve (uni/multi)byteness.
(mm-uu-yenc-extract): Use with-current-buffer.
-rw-r--r--lisp/gnus/ChangeLog3
-rw-r--r--lisp/gnus/mm-uu.el6
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 1dbde2ece02..f985cc85491 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,5 +1,8 @@
12008-03-12 Stefan Monnier <monnier@iro.umontreal.ca> 12008-03-12 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * mm-uu.el (mm-uu-copy-to-buffer): Preserve (uni/multi)byteness.
4 (mm-uu-yenc-extract): Use with-current-buffer.
5
3 * gnus-soup.el (gnus-soup-send-packet): Don't use 6 * gnus-soup.el (gnus-soup-send-packet): Don't use
4 mm-with-unibyte-current-buffer since the buffer is unibyte anyway. 7 mm-with-unibyte-current-buffer since the buffer is unibyte anyway.
5 8
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
index bf5125e37a2..9d5c6368b64 100644
--- a/lisp/gnus/mm-uu.el
+++ b/lisp/gnus/mm-uu.el
@@ -280,11 +280,14 @@ If PROPERTIES is non-nil, PROPERTIES are applied to the buffer,
280see `set-text-properties'. If PROPERTIES equals t, this means to 280see `set-text-properties'. If PROPERTIES equals t, this means to
281apply the face `mm-uu-extract'." 281apply the face `mm-uu-extract'."
282 (let ((obuf (current-buffer)) 282 (let ((obuf (current-buffer))
283 (multi (and (boundp 'enable-multibyte-characters)
284 enable-multibyte-characters))
283 (coding-system 285 (coding-system
284 ;; Might not exist in non-MULE XEmacs 286 ;; Might not exist in non-MULE XEmacs
285 (when (boundp 'buffer-file-coding-system) 287 (when (boundp 'buffer-file-coding-system)
286 buffer-file-coding-system))) 288 buffer-file-coding-system)))
287 (with-current-buffer (generate-new-buffer " *mm-uu*") 289 (with-current-buffer (generate-new-buffer " *mm-uu*")
290 (if multi (mm-enable-multibyte) (mm-disable-multibyte))
288 (setq buffer-file-coding-system coding-system) 291 (setq buffer-file-coding-system coding-system)
289 (insert-buffer-substring obuf from to) 292 (insert-buffer-substring obuf from to)
290 (cond ((eq properties t) 293 (cond ((eq properties t)
@@ -441,8 +444,7 @@ apply the face `mm-uu-extract'."
441 ;; This might not be exactly correct, but we sure can't get the 444 ;; This might not be exactly correct, but we sure can't get the
442 ;; binary data from the article buffer, since that's already in a 445 ;; binary data from the article buffer, since that's already in a
443 ;; non-binary charset. So get it from the original article buffer. 446 ;; non-binary charset. So get it from the original article buffer.
444 (mm-make-handle (save-excursion 447 (mm-make-handle (with-current-buffer gnus-original-article-buffer
445 (set-buffer gnus-original-article-buffer)
446 (mm-uu-copy-to-buffer start-point end-point)) 448 (mm-uu-copy-to-buffer start-point end-point))
447 (list (or (and file-name 449 (list (or (and file-name
448 (string-match "\\.[^\\.]+$" file-name) 450 (string-match "\\.[^\\.]+$" file-name)