X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fnnmbox.el;h=fe4a30bc32d7332f928c359259b9f4ee3a392d08;hb=9b741e050b400987d68ff761c6cc3276c932839c;hp=72e144f3b6564f585ce5c2d13eb04864afc783ab;hpb=3738187cad20787b5b99c4061256e30e19ee721a;p=elisp%2Fgnus.git- diff --git a/lisp/nnmbox.el b/lisp/nnmbox.el index 72e144f..fe4a30b 100644 --- a/lisp/nnmbox.el +++ b/lisp/nnmbox.el @@ -1,10 +1,10 @@ ;;; 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 -;; Masanobu UMEDA +;; Masanobu UMEDA ;; Keywords: news, mail ;; This file is part of GNU Emacs. @@ -26,12 +26,14 @@ ;;; Code: +(eval-when-compile (require 'cl)) +(eval-when-compile (require 'static)) + (require 'nnheader) (require 'message) (require 'nnmail) (require 'nnoo) (require 'gnus-range) -(eval-when-compile (require 'cl)) (nnoo-declare nnmbox) @@ -62,9 +64,9 @@ (defvoo nnmbox-group-alist nil) (defvoo nnmbox-active-timestamp nil) -(defvoo nnmbox-file-coding-system mm-binary-coding-system) +(defvoo nnmbox-file-coding-system 'binary) (defvoo nnmbox-file-coding-system-for-write nil) -(defvoo nnmbox-active-file-coding-system mm-binary-coding-system) +(defvoo nnmbox-active-file-coding-system 'binary) (defvoo nnmbox-active-file-coding-system-for-write nil) (defvar nnmbox-group-building-active-articles nil) @@ -188,9 +190,9 @@ (car active) (cdr active) group))))) (defun nnmbox-save-buffer () - (let ((coding-system-for-write - (or nnmbox-file-coding-system-for-write - nnmbox-file-coding-system))) + (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) @@ -263,8 +265,8 @@ (unless (eq nnmail-expiry-target 'delete) (with-temp-buffer (nnmbox-request-article (car articles) - newsgroup server - (current-buffer)) + newsgroup server + (current-buffer)) (let ((nnml-current-directory nil)) (nnmail-expiry-target-group nnmail-expiry-target newsgroup))) @@ -332,7 +334,7 @@ (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))) @@ -602,7 +604,8 @@ 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) @@ -623,7 +626,6 @@ nnmbox-file-coding-system)) (nnheader-find-file-noselect nnmbox-mbox-file t t)))) - (mm-enable-multibyte) (buffer-disable-undo) ;; Go through the group alist and compare against the mbox file.