changeset 92771:a3d61f1532f1

Use with-current-buffer. (nnmh-request-list-1): Use mm-string-to-multibyte rather than mm-string-as-multibyte on the output of mm-encode-coding-string.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 12 Mar 2008 18:44:07 +0000
parents b7f1378e2a2c
children 3637573105bd
files lisp/gnus/ChangeLog lisp/gnus/nnmh.el
diffstat 2 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Wed Mar 12 18:40:01 2008 +0000
+++ b/lisp/gnus/ChangeLog	Wed Mar 12 18:44:07 2008 +0000
@@ -1,5 +1,9 @@
 2008-03-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* nnmh.el: Use with-current-buffer.
+	(nnmh-request-list-1): Use mm-string-to-multibyte rather than
+	mm-string-as-multibyte on the output of mm-encode-coding-string.
+
 	* nnimap.el (nnimap-retrieve-headers-progress): Use a unibyte temp buffer.
 	(nnimap-request-move-article): Use with-current-buffer.
 
--- a/lisp/gnus/nnmh.el	Wed Mar 12 18:40:01 2008 +0000
+++ b/lisp/gnus/nnmh.el	Wed Mar 12 18:44:07 2008 +0000
@@ -77,8 +77,7 @@
 (nnoo-define-basics nnmh)
 
 (deffoo nnmh-retrieve-headers (articles &optional newsgroup server fetch-old)
-  (save-excursion
-    (set-buffer nntp-server-buffer)
+  (with-current-buffer nntp-server-buffer
     (erase-buffer)
     (let* ((file nil)
 	   (number (length articles))
@@ -225,8 +224,7 @@
     (let ((files (mapcar 'string-to-number
 			 (directory-files dir nil "^[0-9]+$" t))))
       (when files
-	(save-excursion
-	  (set-buffer nntp-server-buffer)
+	(with-current-buffer nntp-server-buffer
 	  (goto-char (point-max))
 	  (insert
 	   (format
@@ -237,7 +235,7 @@
 		(file-truename (file-name-as-directory
 				(expand-file-name nnmh-toplev))))
 	       dir)
-	      (mm-string-as-multibyte
+	      (mm-string-to-multibyte   ;Why?  Isn't it multibyte already?
 	       (mm-encode-coding-string
 		(nnheader-replace-chars-in-string
 		 (substring dir (match-end 0))
@@ -295,8 +293,7 @@
     (and
      (nnmh-deletable-article-p group article)
      (nnmh-request-article article group server)
-     (save-excursion
-       (set-buffer buf)
+     (with-current-buffer buf
        (erase-buffer)
        (insert-buffer-substring nntp-server-buffer)
        (setq result (eval accept-form))
@@ -336,8 +333,7 @@
 
 (deffoo nnmh-request-replace-article (article group buffer)
   (nnmh-possibly-change-directory group)
-  (save-excursion
-    (set-buffer buffer)
+  (with-current-buffer buffer
     (nnmh-possibly-create-directory group)
     (ignore-errors
       (nnmail-write-region
@@ -577,5 +573,5 @@
 
 (provide 'nnmh)
 
-;;; arch-tag: 36c12a98-3bad-44b3-9953-628078ef0e04
+;; arch-tag: 36c12a98-3bad-44b3-9953-628078ef0e04
 ;;; nnmh.el ends here