;;; nnmh.el --- mhspool access for Gnus
-;; Copyright (C) 1995,96,97,98,99 Free Software Foundation, Inc.
+;; Copyright (C) 1995,96,97,98 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
'<))
(cond
(dir
- (setq nnmh-group-alist
- (delq (assoc group nnmh-group-alist) nnmh-group-alist))
- (push (list group (cons (car dir) (car (last dir))))
- nnmh-group-alist)
(nnheader-report 'nnmh "Selected group %s" group)
(nnheader-insert
"211 %d %d %d %s\n" (length dir) (car dir)
- (car (last dir)) group))
+ (progn (while (cdr dir) (setq dir (cdr dir))) (car dir))
+ group))
(t
(nnheader-report 'nnmh "Empty group %s" group)
(nnheader-insert (format "211 0 1 0 %s\n" group))))))))))
(expand-file-name nnmh-toplev))))
dir)
(nnheader-replace-chars-in-string
- (mm-decode-coding-string (substring dir (match-end 0))
- nnmail-pathname-coding-system)
+ (gnus-decode-coding-string (substring dir (match-end 0))
+ nnmail-pathname-coding-system)
?/ ?.))
(apply 'max files)
(apply 'min files)))))))
"Compute the next article number in GROUP."
(let ((active (cadr (assoc group nnmh-group-alist)))
(dir (nnmail-group-pathname group nnmh-directory))
- (pathname-coding-system 'binary)
- file)
+ (pathname-coding-system 'binary))
(unless active
;; The group wasn't known to nnmh, so we just create an active
;; entry for it.
(when files
(setcdr active (car files)))))
(setcdr active (1+ (cdr active)))
- (while (or
- ;; See whether the file exists...
- (file-exists-p
- (setq file (concat (nnmail-group-pathname group nnmh-directory)
- (int-to-string (cdr active)))))
- ;; ... or there is a buffer that will make that file exist
- ;; in the future.
- (get-file-buffer file))
- ;; Skip past that file.
+ (while (file-exists-p
+ (concat (nnmail-group-pathname group nnmh-directory)
+ (int-to-string (cdr active))))
(setcdr active (1+ (cdr active))))
(cdr active)))
(setq articles (sort articles (lambda (art1 art2)
(> (car art1) (car art2)))))
;; Finally write this list back to the .nnmh-articles file.
- (with-temp-file nnmh-file
+ (nnheader-temp-write nnmh-file
(insert ";; Gnus article active file for " group "\n\n")
(insert "(setq nnmh-newsgroup-articles '")
(gnus-prin1 articles)