From 7be1572552ba42fa35c42c055c9acf8d80497ea3 Mon Sep 17 00:00:00 2001 From: czkmt Date: Tue, 28 Dec 1999 16:01:06 +0000 Subject: [PATCH] (gnus-offline-auto-expre): Rename from `gnus-offline-agent-automatic-expire'. (gnus-agent-expire): Fix the advice. (gnus-offline-after-jobs-done): Refer to `gnus-offline-auto-expire'. --- lisp/gnus-offline.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/gnus-offline.el b/lisp/gnus-offline.el index 472672d..bf58265 100644 --- a/lisp/gnus-offline.el +++ b/lisp/gnus-offline.el @@ -190,7 +190,7 @@ If mail , gnus-offline only fetch mail articles. :group 'gnus-offline :type 'function) -(defcustom gnus-offline-agent-automatic-expire t +(defcustom gnus-offline-auto-expire t "*Non-nil means expire articles on every session." :group 'gnus-offline :type 'boolean) @@ -420,10 +420,10 @@ Please check your .emacs or .gnus.el to work nnspool fine.") (defadvice gnus-agent-expire (around gnus-offline-advice activate preactivate) "Advice not to delete new articles." - (and gnus-offline-agent-automatic-expire - (if (eq 0 gnus-agent-expire-days) - (let (gnus-agent-expire-all) - ad-do-it) + (cond ((eq 0 gnus-agent-expire-days) + (let (gnus-agent-expire-all) + ad-do-it)) + (t ad-do-it))) ;; @@ -665,7 +665,8 @@ Please check your .emacs or .gnus.el to work nnspool fine.") (run-hooks 'gnus-offline-after-online-hook) (if (eq gnus-offline-articles-to-fetch 'mail) (gnus-offline-restore-mail-group-level)) - (if (eq gnus-offline-news-fetch-method 'nnagent) + (if (and (eq gnus-offline-news-fetch-method 'nnagent) + gnus-offline-auto-expire) (gnus-agent-expire)) (if (and (featurep 'xemacs) (fboundp 'play-sound-file)) -- 1.7.10.4