Synch to No Gnus 200406292138.
[elisp/gnus.git-] / lisp / nnmh.el
index cfefeb4..f630e0c 100644 (file)
@@ -34,7 +34,6 @@
 ;;; Code:
 
 (eval-when-compile (require 'cl))
-(eval-when-compile (require 'gnus-clfns))
 
 (require 'nnheader)
 (require 'nnmail)
@@ -89,7 +88,6 @@ as unread by Gnus.")
                       (> number nnmail-large-newsgroup)))
           (count 0)
           (file-name-coding-system nnmail-pathname-coding-system)
-          (pathname-coding-system nnmail-pathname-coding-system)
           beg article)
       (nnmh-possibly-change-directory newsgroup server)
       ;; We don't support fetching by Message-ID.
@@ -149,7 +147,6 @@ as unread by Gnus.")
                  nil
                (concat nnmh-current-directory (int-to-string id))))
        (file-name-coding-system nnmail-pathname-coding-system)
-       (pathname-coding-system nnmail-pathname-coding-system)
        (nntp-server-buffer (or buffer nntp-server-buffer)))
     (and (stringp file)
         (file-exists-p file)
@@ -162,7 +159,6 @@ as unread by Gnus.")
   (nnmh-possibly-change-directory group server)
   (let ((pathname (nnmail-group-pathname group nnmh-directory))
        (file-name-coding-system nnmail-pathname-coding-system)
-       (pathname-coding-system nnmail-pathname-coding-system)
        dir)
     (cond
      ((not (file-directory-p pathname))
@@ -182,7 +178,7 @@ as unread by Gnus.")
        (nnheader-re-read-dir pathname)
        (setq dir
              (sort
-              (mapcar (lambda (name) (string-to-int name))
+              (mapcar 'string-to-int
                       (directory-files pathname nil "^[0-9]+$" t))
               '<))
        (cond
@@ -206,7 +202,6 @@ as unread by Gnus.")
   (nnheader-insert "")
   (nnmh-possibly-change-directory nil server)
   (let ((file-name-coding-system nnmail-pathname-coding-system)
-       (pathname-coding-system nnmail-pathname-coding-system)
        (nnmh-toplev
         (file-truename (or dir (file-name-as-directory nnmh-directory)))))
     (nnmh-request-list-1 nnmh-toplev))
@@ -218,7 +213,6 @@ as unread by Gnus.")
   (setq dir (expand-file-name dir))
   ;; Recurse down all directories.
   (let ((dirs (and (file-readable-p dir)
-                  (> (nth 1 (file-attributes (file-chase-links dir))) 2)
                   (nnheader-directory-files dir t nil t)))
        rdir)
     ;; Recurse down directories.
@@ -230,9 +224,8 @@ as unread by Gnus.")
        (nnmh-request-list-1 rdir))))
   ;; For each directory, generate an active file line.
   (unless (string= (expand-file-name nnmh-toplev) dir)
-    (let ((files (mapcar
-                 (lambda (name) (string-to-int name))
-                 (directory-files dir nil "^[0-9]+$" t))))
+    (let ((files (mapcar 'string-to-int
+                        (directory-files dir nil "^[0-9]+$" t))))
       (when files
        (save-excursion
          (set-buffer nntp-server-buffer)
@@ -365,11 +358,9 @@ as unread by Gnus.")
            nnmh-group-alist)
       (nnmh-possibly-create-directory group)
       (nnmh-possibly-change-directory group server)
-      (let ((articles (mapcar
-                      (lambda (file)
-                        (string-to-int file))
-                      (directory-files
-                       nnmh-current-directory nil "^[0-9]+$"))))
+      (let ((articles (mapcar 'string-to-int
+                             (directory-files
+                              nnmh-current-directory nil "^[0-9]+$"))))
        (when articles
          (setcar active (apply 'min articles))
          (setcdr active (apply 'max articles))))))
@@ -433,8 +424,7 @@ as unread by Gnus.")
     (nnmh-open-server server))
   (when newsgroup
     (let ((pathname (nnmail-group-pathname newsgroup nnmh-directory))
-         (file-name-coding-system nnmail-pathname-coding-system)
-         (pathname-coding-system nnmail-pathname-coding-system))
+         (file-name-coding-system nnmail-pathname-coding-system))
       (if (file-directory-p pathname)
          (setq nnmh-current-directory pathname)
        (nnheader-report 'nnmh "Not a directory: %s" nnmh-directory)))))
@@ -484,7 +474,6 @@ as unread by Gnus.")
   (let ((active (cadr (assoc group nnmh-group-alist)))
        (dir (nnmail-group-pathname group nnmh-directory))
        (file-name-coding-system nnmail-pathname-coding-system)
-       (pathname-coding-system nnmail-pathname-coding-system)
        file)
     (unless active
       ;; The group wasn't known to nnmh, so we just create an active
@@ -495,10 +484,8 @@ as unread by Gnus.")
        (gnus-make-directory dir))
       ;; Find the highest number in the group.
       (let ((files (sort
-                   (mapcar
-                    (lambda (f)
-                      (string-to-int f))
-                    (directory-files dir nil "^[0-9]+$"))
+                   (mapcar 'string-to-int
+                           (directory-files dir nil "^[0-9]+$"))
                    '>)))
        (when files
          (setcdr active (car files)))))
@@ -520,7 +507,7 @@ as unread by Gnus.")
   ;; articles in this folder.  The articles that are "new" will be
   ;; marked as unread by Gnus.
   (let* ((dir nnmh-current-directory)
-        (files (sort (mapcar (function (lambda (name) (string-to-int name)))
+        (files (sort (mapcar 'string-to-int
                              (directory-files nnmh-current-directory
                                               nil "^[0-9]+$" t))
                      '<))