Merge from emacs--devo--0
[gnus] / lisp / nnmh.el
index 88730a2..1dd24e0 100644 (file)
@@ -9,10 +9,10 @@
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,9 +20,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -77,8 +75,7 @@ as unread by Gnus.")
 (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 +222,7 @@ as unread by Gnus.")
     (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 +233,7 @@ as unread by Gnus.")
                (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))
@@ -298,8 +294,7 @@ as unread by Gnus.")
     (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))
@@ -339,8 +334,7 @@ as unread by Gnus.")
 
 (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
@@ -580,5 +574,5 @@ as unread by Gnus.")
 
 (provide 'nnmh)
 
-;;; arch-tag: 36c12a98-3bad-44b3-9953-628078ef0e04
+;; arch-tag: 36c12a98-3bad-44b3-9953-628078ef0e04
 ;;; nnmh.el ends here