(nnml-generate-nov-databases-directory): Rename from
[gnus] / lisp / nnml.el
index 43f9b8f..9aa5b77 100644 (file)
@@ -1,7 +1,7 @@
 ;;; nnml.el --- mail spool access for Gnus
 
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-;;   2004, 2005 Free Software Foundation, Inc.
+;;   2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Authors: Didier Verna <didier@xemacs.org> (adding compaction)
 ;;     Simon Josefsson <simon@josefsson.org> (adding MARKS)
 (require 'gnus)
 (require 'nnheader)
 (require 'nnmail)
-(require 'gnus-bcklg)
 (require 'nnoo)
 (eval-when-compile (require 'cl))
 
 (eval-and-compile
-  (autoload 'gnus-article-unpropagatable-p "gnus-sum"))
+  (autoload 'gnus-article-unpropagatable-p "gnus-sum")
+  (autoload 'gnus-backlog-remove-article "gnus-bcklg"))
 
 (nnoo-declare nnml)
 
@@ -85,7 +85,12 @@ marks file will be regenerated properly by Gnus.")
   "If non-nil, inhibit expiry.")
 
 (defvoo nnml-use-compressed-files nil
-  "If non-nil, allow using compressed message files.")
+  "If non-nil, allow using compressed message files.
+
+If it is a string, use it as the file extension which specifies
+the comression program.  You can set it to \".bz2\" if your Emacs
+supports auto-compression using the bzip2 program.  A value of t
+is equivalent to \".gz\".")
 
 (defvoo nnml-compressed-files-size-threshold 1000
   "Default size threshold for compressed message files.
@@ -631,7 +636,9 @@ non-nil.")
     (setq extension
          (and nnml-use-compressed-files
              (> chars nnml-compressed-files-size-threshold)
-              ".gz"))
+             (if (stringp nnml-use-compressed-files)
+                 nnml-use-compressed-files
+               ".gz")))
     (nnmail-insert-xref group-art)
     (run-hooks 'nnmail-prepare-save-mail-hook)
     (run-hooks 'nnml-prepare-save-mail-hook)
@@ -763,11 +770,11 @@ non-nil.")
     (nnml-open-server server))
   (setq nnml-directory (expand-file-name nnml-directory))
   ;; Recurse down the directories.
-  (nnml-generate-nov-databases-1 nnml-directory nil t)
+  (nnml-generate-nov-databases-directory nnml-directory nil t)
   ;; Save the active file.
   (nnmail-save-active nnml-group-alist nnml-active-file))
 
-(defun nnml-generate-nov-databases-1 (dir &optional seen no-active)
+(defun nnml-generate-nov-databases-directory (dir &optional seen no-active)
   "Regenerate the NOV database in DIR."
   (interactive "DRegenerate NOV in: ")
   (setq dir (file-name-as-directory dir))
@@ -778,7 +785,7 @@ non-nil.")
     (dolist (dir (directory-files dir t nil t))
       (when (and (not (string-match "^\\." (file-name-nondirectory dir)))
                 (file-directory-p dir))
-       (nnml-generate-nov-databases-1 dir seen)))
+       (nnml-generate-nov-databases-directory dir seen)))
     ;; Do this directory.
     (let ((files (sort (nnheader-article-to-file-alist dir)
                       'car-less-than-car)))
@@ -1037,6 +1044,8 @@ Use the nov database for the current group if available."
 ;; #### other backends get a compaction feature. Also, note that invalidating
 ;; #### the "original article buffer" is already done at an upper level.
 
+;; Shouldn't `nnml-request-compact-group' be interactive? --rsteib
+
 (defun nnml-request-compact-group (group &optional server save)
   (nnml-possibly-change-directory group server)
   (unless nnml-article-file-alist