comparison lisp/gnus/gnus-demon.el @ 116:9f59509498e1 r20-1b10

Import from CVS: tag r20-1b10
author cvs
date Mon, 13 Aug 2007 09:23:06 +0200
parents 360340f9fd5f
children b980b6286996
comparison
equal deleted inserted replaced
115:f109f7dabbe2 116:9f59509498e1
72 (defvar gnus-demon-timer nil) 72 (defvar gnus-demon-timer nil)
73 (defvar gnus-demon-idle-has-been-called nil) 73 (defvar gnus-demon-idle-has-been-called nil)
74 (defvar gnus-demon-idle-time 0) 74 (defvar gnus-demon-idle-time 0)
75 (defvar gnus-demon-handler-state nil) 75 (defvar gnus-demon-handler-state nil)
76 (defvar gnus-demon-last-keys nil) 76 (defvar gnus-demon-last-keys nil)
77 (defvar gnus-inhibit-demon nil
78 "*If non-nil, no daemonic function will be run.")
77 79
78 (eval-and-compile 80 (eval-and-compile
79 (autoload 'timezone-parse-date "timezone") 81 (autoload 'timezone-parse-date "timezone")
80 (autoload 'timezone-make-arpa-date "timezone")) 82 (autoload 'timezone-make-arpa-date "timezone"))
81 83
170 (if (gnus-demon-is-idle-p) 172 (if (gnus-demon-is-idle-p)
171 (incf gnus-demon-idle-time) 173 (incf gnus-demon-idle-time)
172 (setq gnus-demon-idle-time 0) 174 (setq gnus-demon-idle-time 0)
173 (setq gnus-demon-idle-has-been-called nil)) 175 (setq gnus-demon-idle-has-been-called nil))
174 ;; Disable all daemonic stuff if we're in the minibuffer 176 ;; Disable all daemonic stuff if we're in the minibuffer
175 (unless (window-minibuffer-p (selected-window)) 177 (when (and (not (window-minibuffer-p (selected-window)))
178 (not gnus-inhibit-demon))
176 ;; Then we go through all the handler and call those that are 179 ;; Then we go through all the handler and call those that are
177 ;; sufficiently ripe. 180 ;; sufficiently ripe.
178 (let ((handlers gnus-demon-handler-state) 181 (let ((handlers gnus-demon-handler-state)
182 (gnus-inhibit-demon t)
179 handler time idle) 183 handler time idle)
180 (while handlers 184 (while handlers
181 (setq handler (pop handlers)) 185 (setq handler (pop handlers))
182 (cond 186 (cond
183 ((numberp (setq time (nth 1 handler))) 187 ((numberp (setq time (nth 1 handler)))