changeset 64583:e254b23f6e7b

(mm-uu-copy-to-buffer): Use with-current-buffer.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 21 Jul 2005 19:08:42 +0000
parents 3196fbe99547
children e98d8f65bc97
files lisp/gnus/mm-uu.el
diffstat 1 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/mm-uu.el	Thu Jul 21 19:08:30 2005 +0000
+++ b/lisp/gnus/mm-uu.el	Thu Jul 21 19:08:42 2005 +0000
@@ -111,8 +111,8 @@
      "^exit 0$"
      mm-uu-shar-extract)
     (forward
-;;; Thanks to Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov> and
-;;; Peter von der Ah\'e <pahe@daimi.au.dk>
+     ;; Thanks to Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov> and
+     ;; Peter von der Ah\'e <pahe@daimi.au.dk>
      "^-+ \\(Start of \\)?Forwarded message"
      "^-+ End \\(of \\)?forwarded message"
      mm-uu-forward-extract
@@ -186,13 +186,12 @@
 (defun mm-uu-copy-to-buffer (&optional from to)
   "Copy the contents of the current buffer to a fresh buffer.
 Return that buffer."
-  (save-excursion
-    (let ((obuf (current-buffer))
-	  (coding-system
-	   ;; Might not exist in non-MULE XEmacs
-	   (when (boundp 'buffer-file-coding-system)
-	     buffer-file-coding-system)))
-      (set-buffer (generate-new-buffer " *mm-uu*"))
+  (let ((obuf (current-buffer))
+        (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*")
       (setq buffer-file-coding-system coding-system)
       (insert-buffer-substring obuf from to)
       (current-buffer))))
@@ -496,5 +495,5 @@
 
 (provide 'mm-uu)
 
-;;; arch-tag: 7db076bf-53db-4320-aa19-ca76a1d2ab2c
+;; arch-tag: 7db076bf-53db-4320-aa19-ca76a1d2ab2c
 ;;; mm-uu.el ends here