From 3bb87577265518a9dfc2c204ef53eccf36e4b65b Mon Sep 17 00:00:00 2001 From: czkmt Date: Fri, 10 Dec 1999 10:02:30 +0000 Subject: [PATCH] (gnus): Give up to advise here. (gnus-group-get-new-news): New advice instead. --- lisp/gnus-agent.el | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 3b926a6..2acd989 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -29,7 +29,7 @@ (require 'gnus-cache) (require 'nnvirtual) (require 'gnus-sum) -(eval-when-compile (require 'gnus-score)) +(eval-when-compile (require 'gnus-score) (require 'gnus-group)) (defcustom gnus-agent-directory (nnheader-concat gnus-directory "agent/") "Where the Gnus agent will store its files." @@ -320,10 +320,6 @@ fetched will be limited to it. If not a positive integer, never consider it." (setq gnus-plugged t) (gnus)) -(defadvice gnus (after gnus-agent-advice activate preactivate) - "Update modeline." - (gnus-agent-toggle-plugged gnus-plugged)) - ;;;###autoload (defun gnus-agentize () "Allow Gnus to be an offline newsreader. @@ -1601,6 +1597,16 @@ The following commands are available: (gnus-group-send-drafts) (gnus-agent-fetch-session)) +;;; +;;; Advice +;;; + +(defadvice gnus-group-get-new-news (after gnus-agent-advice + activate preactivate) + "Update modeline." + (unless (interactive-p) + (gnus-agent-toggle-plugged gnus-plugged))) + (provide 'gnus-agent) ;;; gnus-agent.el ends here -- 1.7.10.4