;;; Code:
(eval-when-compile (require 'cl))
-(eval-when-compile (require 'gnus-clfns))
(require 'nnheader)
(require 'nnmail)
(> 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.
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)
(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))
(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
(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))
(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.
(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)
(deffoo nnmh-close-group (group &optional server)
t)
-(deffoo nnmh-request-move-article (article group server
- accept-form &optional last)
+(deffoo nnmh-request-move-article (article group server accept-form
+ &optional last move-is-internal)
(let ((buf (get-buffer-create " *nnmh move*"))
result)
(and
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))))))
(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)))))
(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
(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)))))
;; 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))
'<))