*** empty log message ***
[gnus] / lisp / gnus-cache.el
index 485c4d3..ea61f5d 100644 (file)
@@ -1,5 +1,5 @@
 ;;; gnus-cache.el --- cache interface for Gnus
-;; Copyright (C) 1995,96,97 Free Software Foundation, Inc.
+;; Copyright (C) 1995,96,97,98 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
 ;; Keywords: news
@@ -25,6 +25,8 @@
 
 ;;; Code:
 
+(eval-when-compile (require 'cl))
+
 (require 'gnus)
 (require 'gnus-int)
 (require 'gnus-range)
   :type 'file)
 
 (defcustom gnus-cache-enter-articles '(ticked dormant)
-  "Classes of articles to enter into the cache."
+  "*Classes of articles to enter into the cache."
   :group 'gnus-cache
   :type '(set (const ticked) (const dormant) (const unread) (const read)))
 
 (defcustom gnus-cache-remove-articles '(read)
-  "Classes of articles to remove from the cache."
+  "*Classes of articles to remove from the cache."
   :group 'gnus-cache
   :type '(set (const ticked) (const dormant) (const unread) (const read)))
 
@@ -314,7 +316,6 @@ variable to \"^nnml\"."
 If not given a prefix, use the process marked articles instead.
 Returns the list of articles entered."
   (interactive "P")
-  (gnus-set-global-variables)
   (let ((articles (gnus-summary-work-articles n))
        article out)
     (while (setq article (pop articles))
@@ -336,7 +337,6 @@ Returns the list of articles entered."
 If not given a prefix, use the process marked articles instead.
 Returns the list of articles removed."
   (interactive "P")
-  (gnus-set-global-variables)
   (gnus-cache-change-buffer gnus-newsgroup-name)
   (let ((articles (gnus-summary-work-articles n))
        article out)
@@ -360,10 +360,13 @@ Returns the list of articles removed."
   (let ((cached gnus-newsgroup-cached)
        (gnus-verbose (max 6 gnus-verbose)))
     (unless cached
-      (error "No cached articles for this group"))
+      (gnus-message 3 "No cached articles for this group"))
     (while cached
       (gnus-summary-goto-subject (pop cached) t))))
 
+(defalias 'gnus-summary-limit-include-cached
+  'gnus-summary-insert-cached-articles)
+
 ;;; Internal functions.
 
 (defun gnus-cache-change-buffer (group)
@@ -558,6 +561,7 @@ $ emacs -batch -l ~/.emacs -l gnus -f gnus-jog-cache"
   "Read the cache active file."
   (gnus-make-directory gnus-cache-directory)
   (if (or (not (file-exists-p gnus-cache-active-file))
+         (not (zerop (nth 7 (file-attributes gnus-cache-active-file))))
          force)
       ;; There is no active file, so we generate one.
       (gnus-cache-generate-active)