;;; nnmbox.el --- mail mbox access for Gnus
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
(1+ (- (cdr active) (car active)))
(car active) (cdr active) group)))))
-(static-if (boundp 'MULE)
- (defun nnmbox-save-buffer ()
- (let ((output-coding-system
- (or nnmbox-file-coding-system-for-write
- nnmbox-file-coding-system)))
- (save-buffer)))
- (defun nnmbox-save-buffer ()
- (let ((coding-system-for-write
- (or nnmbox-file-coding-system-for-write
- nnmbox-file-coding-system)))
- (save-buffer)))
- )
+(defun nnmbox-save-buffer ()
+ (let* ((coding-system-for-write (or nnmbox-file-coding-system-for-write
+ nnmbox-file-coding-system))
+ (output-coding-system coding-system-for-write))
+ (save-buffer)))
(defun nnmbox-save-active (group-alist active-file)
(let ((nnmail-active-file-coding-system
(while (re-search-backward "^X-Gnus-Newsgroup: " nil t)
(delete-region (point) (progn (forward-line 1) (point))))
(when nnmail-cache-accepted-message-ids
- (nnmail-cache-insert (nnmail-fetch-field "message-id")))
+ (nnmail-cache-insert (nnmail-fetch-field "message-id") group))
(setq result (if (stringp group)
(list (cons group (nnmbox-active-number group)))
(nnmail-article-group 'nnmbox-active-number)))
nnmbox-file-coding-system))
(dir (file-name-directory nnmbox-mbox-file)))
(and dir (gnus-make-directory dir))
- (nnmail-write-region 1 1 nnmbox-mbox-file t 'nomesg))))
+ (nnmail-write-region (point-min) (point-min)
+ nnmbox-mbox-file t 'nomesg))))
(defun nnmbox-read-mbox ()
(nnmail-activate 'nnmbox)