(gnus-agent-expire-days): Change default to nil.
authorSimon Josefsson <jas@extundo.com>
Wed, 5 Feb 2003 06:22:22 +0000 (06:22 +0000)
committerSimon Josefsson <jas@extundo.com>
Wed, 5 Feb 2003 06:22:22 +0000 (06:22 +0000)
(gnus-agent-expire): Don't expire if g-a-e-d is nil.

lisp/ChangeLog
lisp/gnus-agent.el

index 03200c9..49dbf9b 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-05  Simon Josefsson  <jas@extundo.com>
+
+       * gnus-agent.el (gnus-agent-expire-days): Change default to nil.
+       (gnus-agent-expire): Don't expire if g-a-e-d is nil.
+
 2003-02-05  Jesper Harder  <harder@ifa.au.dk>
 
        * gnus-util.el (gnus-delete-if): Rename to gnus-remove-if.
index d1e1c92..6928064 100644 (file)
@@ -1,5 +1,5 @@
 ;;; gnus-agent.el --- unplugged support for Gnus
-;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
   :group 'gnus-agent
   :type 'integer)
 
-(defcustom gnus-agent-expire-days 7
+(defcustom gnus-agent-expire-days nil
   "Read articles older than this will be expired.
-This can also be a list of regexp/day pairs.  The regexps will
-be matched against group names."
+This can also be a list of regexp/day pairs.  The regexps will be
+matched against group names.  If nil, articles in the agent cache are
+never expired."
   :group 'gnus-agent
-  :type 'integer)
+  :type '(choice (number :tag "days")
+                (const :tag "never" nil)))
 
 (defcustom gnus-agent-expire-all nil
   "If non-nil, also expire unread, ticked and dormant articles.
@@ -2124,8 +2126,11 @@ Setting GROUP will limit expiration to that group.
 FORCE is equivalent to setting gnus-agent-expire-days to zero(0)."
   (interactive)
 
-  (if (or (not (eq articles t))
-          (yes-or-no-p (concat "Are you sure that you want to expire all articles in " (if group group "every agentized group") ".")))
+  (if (and (not gnus-agent-expire-days)
+          (or (not (eq articles t))
+              (yes-or-no-p (concat "Are you sure that you want to expire all "
+                                   "articles in " (if group group
+                                                    "every agentized group") "."))))
       (let ((methods (if group
                          (list (gnus-find-method-for-group group))
                        gnus-agent-covered-methods))