From 7573397b97583f7b4df7ae96f006a4a1138ab461 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 21 Jul 2005 19:08:48 +0000 Subject: [PATCH] (mm-uu-copy-to-buffer): Use with-current-buffer. --- lisp/gnus/ChangeLog | 7 +++++++ lisp/gnus/mm-uu.el | 19 +++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7a22f9b16db..0e6e4ae283e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,10 @@ +2005-07-21 Stefan Monnier + + * mml.el (mml-minibuffer-read-disposition): Don't use inline by default + for text/rtf. Display default in prompt. Pass default for M-n. + + * mm-uu.el (mm-uu-copy-to-buffer): Use with-current-buffer. + 2005-07-16 Lars Magne Ingebrigtsen * gnus-msg.el (gnus-button-mailto): Remove diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index ad40ffb4564..5d8f696fe41 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el @@ -111,8 +111,8 @@ This can be either \"inline\" or \"attachment\".") "^exit 0$" mm-uu-shar-extract) (forward -;;; Thanks to Edward J. Sabol and -;;; Peter von der Ah\'e + ;; Thanks to Edward J. Sabol and + ;; Peter von der Ah\'e "^-+ \\(Start of \\)?Forwarded message" "^-+ End \\(of \\)?forwarded message" mm-uu-forward-extract @@ -186,13 +186,12 @@ To disable dissecting shar codes, for instance, add (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 @@ Return that buffer." (provide 'mm-uu) -;;; arch-tag: 7db076bf-53db-4320-aa19-ca76a1d2ab2c +;; arch-tag: 7db076bf-53db-4320-aa19-ca76a1d2ab2c ;;; mm-uu.el ends here -- 2.39.2