mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-18 03:40:47 -08:00
(mm-uu-copy-to-buffer): Preserve (uni/multi)byteness.
(mm-uu-yenc-extract): Use with-current-buffer.
This commit is contained in:
parent
f5fcf556b2
commit
456cace2bc
2 changed files with 7 additions and 2 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
2008-03-12 Stefan Monnier <monnier@iro.umontreal.ca>
|
2008-03-12 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* 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
|
* gnus-soup.el (gnus-soup-send-packet): Don't use
|
||||||
mm-with-unibyte-current-buffer since the buffer is unibyte anyway.
|
mm-with-unibyte-current-buffer since the buffer is unibyte anyway.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -280,11 +280,14 @@ If PROPERTIES is non-nil, PROPERTIES are applied to the buffer,
|
||||||
see `set-text-properties'. If PROPERTIES equals t, this means to
|
see `set-text-properties'. If PROPERTIES equals t, this means to
|
||||||
apply the face `mm-uu-extract'."
|
apply the face `mm-uu-extract'."
|
||||||
(let ((obuf (current-buffer))
|
(let ((obuf (current-buffer))
|
||||||
|
(multi (and (boundp 'enable-multibyte-characters)
|
||||||
|
enable-multibyte-characters))
|
||||||
(coding-system
|
(coding-system
|
||||||
;; Might not exist in non-MULE XEmacs
|
;; Might not exist in non-MULE XEmacs
|
||||||
(when (boundp 'buffer-file-coding-system)
|
(when (boundp 'buffer-file-coding-system)
|
||||||
buffer-file-coding-system)))
|
buffer-file-coding-system)))
|
||||||
(with-current-buffer (generate-new-buffer " *mm-uu*")
|
(with-current-buffer (generate-new-buffer " *mm-uu*")
|
||||||
|
(if multi (mm-enable-multibyte) (mm-disable-multibyte))
|
||||||
(setq buffer-file-coding-system coding-system)
|
(setq buffer-file-coding-system coding-system)
|
||||||
(insert-buffer-substring obuf from to)
|
(insert-buffer-substring obuf from to)
|
||||||
(cond ((eq properties t)
|
(cond ((eq properties t)
|
||||||
|
|
@ -441,8 +444,7 @@ apply the face `mm-uu-extract'."
|
||||||
;; This might not be exactly correct, but we sure can't get the
|
;; 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
|
;; binary data from the article buffer, since that's already in a
|
||||||
;; non-binary charset. So get it from the original article buffer.
|
;; non-binary charset. So get it from the original article buffer.
|
||||||
(mm-make-handle (save-excursion
|
(mm-make-handle (with-current-buffer gnus-original-article-buffer
|
||||||
(set-buffer gnus-original-article-buffer)
|
|
||||||
(mm-uu-copy-to-buffer start-point end-point))
|
(mm-uu-copy-to-buffer start-point end-point))
|
||||||
(list (or (and file-name
|
(list (or (and file-name
|
||||||
(string-match "\\.[^\\.]+$" file-name)
|
(string-match "\\.[^\\.]+$" file-name)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue