summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/mail.el b/mail.el
index 008df28..0e2ecdb 100644
--- a/mail.el
+++ b/mail.el
@@ -307,11 +307,16 @@ If FOREGROUND-P is `0', do not fetch mails, but just run
0)
((null arg))))))
(let ((process-found (get-process "durand-mail-update"))
- (internet-on (durand-internet-on)))
+ (internet-on (durand-internet-on))
+ (gnus-on (get-buffer "*Group*")))
(cond
((and (numberp foreground-p)
(= foreground-p 0))
(run-hooks 'durand-mail-update-hook))
+ ((not gnus-on)
+ ;; Do nothing if GNUS is not turned on, and the function is
+ ;; asked to update in the background.
+ )
((and (not process-found) internet-on)
(make-process
:name "durand-mail-update"