;ELC   
;;; Compiled by amu@daemon on Thu Jan 11 15:02:59 2001
;;; from file /afs/sipb.mit.edu/contrib/emacs/packages/gnus-5.8.8/lisp/gnus-demon.el
;;; in Emacs version 20.7.2
;;; with bytecomp version 2.56
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`gnus-demon.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\301\302!\210\301\303!\210\301\304!\210\301\305!\210\301\306!\210\301\307!\210\310\311!\203% \301\312!\210\202) \301\313!\210\314\315\316\317\302%\207" [:group require gnus gnus-int nnheader nntp nnmail gnus-util featurep xemacs itimer timer custom-declare-group gnus-demon nil "Demonic behaviour."] 6)
#@599 Alist of daemonic handlers to be run at intervals.
Each handler is a list on the form

(FUNCTION TIME IDLE)

FUNCTION is the function to be called.
TIME is the number of `gnus-demon-timestep's between each call.
If nil, never call.  If t, call each `gnus-demon-timestep'.
If IDLE is t, only call if Emacs has been idle for a while.  If IDLE
is a number, only call when Emacs has been idle more than this number
of `gnus-demon-timestep's.  If IDLE is nil, don't care about
idleness.  If IDLE is a number and TIME is nil, then call once each
time Emacs has been idle for IDLE `gnus-demon-timestep's.
(custom-declare-variable 'gnus-demon-handlers 'nil '(#$ . 947) :group 'gnus-demon :type '(repeat (list function (choice :tag "Time" (const :tag "never" nil) (const :tag "one" t) (integer :tag "steps" 1)) (choice :tag "Idle" (const :tag "don't care" nil) (const :tag "for a while" t) (integer :tag "steps" 1)))))
#@44 *Number of seconds in each demon timestep.
(custom-declare-variable 'gnus-demon-timestep '60 '(#$ . -1863) :group 'gnus-demon :type 'integer)
(byte-code "\306\300!\204 \307\300	B\306\302!\204 \307\302	B\306\303!\204  \310\303	B\306\304!\204, \307\304	B\306\305!\2048 \307\305	B\307\207" [gnus-demon-timer current-load-list gnus-demon-idle-has-been-called gnus-demon-idle-time gnus-demon-handler-state gnus-demon-last-keys boundp nil 0] 2)
#@48 *If non-nil, no daemonic function will be run.
(defvar gnus-inhibit-demon nil (#$ . -2320))
#@54 Add the handler FUNCTION to be run at TIME and IDLE.
(defalias 'gnus-demon-add-handler #[(function time idle) "\304!\210	\nEB\305 \207" [function time idle gnus-demon-handlers gnus-demon-remove-handler gnus-demon-init] 3 (#$ . 2418)])
#@56 Remove the handler FUNCTION from the list of handlers.
(defalias 'gnus-demon-remove-handler #[(function &optional no-init) "\303	\236	\"\n?\205 \304 \207" [function gnus-demon-handlers no-init delq gnus-demon-init] 3 (#$ . 2663)])
#@29 Initialize the Gnus daemon.
(defalias 'gnus-demon-init #[nil "\306 \210\205 \307	\211\310#\311\312\"\313\314\211\207" [gnus-demon-handlers gnus-demon-timestep gnus-demon-timer gnus-demon-handler-state gnus-demon-idle-time gnus-demon-idle-has-been-called gnus-demon-cancel nnheader-run-at-time gnus-demon mapcar #[(handler) "@\301A@!\3028E\207" [handler gnus-demon-time-to-step 2] 4] 0 nil] 4 (#$ . 2903) nil])
(gnus-add-shutdown 'gnus-demon-cancel 'gnus)
#@26 Cancel any Gnus daemons.
(defalias 'gnus-demon-cancel #[nil "\203 \302!\210\303\303\303\304\305\217\207" [gnus-demon-timer gnus-demon-idle-has-been-called nnheader-cancel-timer nil (byte-code "\300\301!\207" [nnheader-cancel-function-timers gnus-demon] 2) ((error t))] 3 (#$ . 3374) nil])
#@31 Whether Emacs is idle or not.
(defalias 'gnus-demon-is-idle-p #[nil "\302 \211	\232\206\f \303)\207" [keys gnus-demon-last-keys recent-keys nil] 3 (#$ . 3674)])
#@66 Find out how many seconds to TIME, which is on the form "17:43".
(defalias 'gnus-demon-time-to-step #[(time) ";\204 \207\306 \307	!\310!\211\311\234\312\234\313\314\f\n\315\234\f\n\311\234W\2049 \f\n\311\234U\203= \n\312\234X\203= \312\202> \314\\\n\316\234\n\317\234\n\320\234\n\321\234\n\322\234&	\211@	@Z\323_A@	A@Z\\\324\245!.\207" [time now nowParts thenParts thenHour thenMin current-time decode-time parse-time-string 2 1 encode-time 0 3 4 5 6 7 8 65536 round then diff gnus-demon-timestep] 12 (#$ . 3844)])
#@63 The Gnus daemon that takes care of running all Gnus handlers.
(defalias 'gnus-demon #[nil "\306 \203 T\202 \307\310\311\312 !?\205\311 \n?\205\311 \313\310\314\310\211\211\205\307 \211A@\211A@\211\247\203\213 \307U\204T AS\211\240\210\307U\203. \3158\211\203t \f\247\203n \fW\202q \307W\203. \316\317\320\217\210A\321@\236A@!\240\210\202. \3158\211\203. \f\247\204\246 \306 \203\246 \322\323\324\217\210\202. @	>\204. \fW\203. \306 \203. \325\326\327\217\210@	B\202. .\207" [gnus-demon-idle-time gnus-demon-idle-has-been-called gnus-inhibit-demon gnus-demon-handler-state idle time gnus-demon-is-idle-p 0 nil window-minibuffer-p selected-window t 10 2 #1=#:G88751 (byte-code "@ \207" [handler] 1) ((error)) gnus-demon-time-to-step #2=#:G88752 (byte-code "@ \207" [handler] 1) ((error)) #3=#:G88753 (byte-code "@ \207" [handler] 1) ((error)) handler last-nonmenu-event use-dialog-box handlers gnus-demon-handlers] 8 (#$ . 4388)])
#@38 Add daemonic NoCeM handling to Gnus.
(defalias 'gnus-demon-add-nocem #[nil "\300\301\302\303#\207" [gnus-demon-add-handler gnus-demon-scan-nocem 60 30] 4 (#$ . 5380)])
#@39 Scan NoCeM groups for NoCeM messages.
(defalias 'gnus-demon-scan-nocem #[nil "\300\213\207" [((gnus-nocem-scan-groups))] 1 (#$ . 5554)])
#@44 Add daemonic server disconnection to Gnus.
(defalias 'gnus-demon-add-disconnection #[nil "\300\301\302\303#\207" [gnus-demon-add-handler gnus-demon-close-connections nil 30] 4 (#$ . 5697)])
(defalias 'gnus-demon-close-connections #[nil "\300\213\207" [((gnus-close-backends))] 1])
#@143 Add daemonic nntp server disconnection to Gnus.
If no commands have gone out via nntp during the last five
minutes, the connection is closed.
(defalias 'gnus-demon-add-nntp-close-connection #[nil "\300\301\302\303#\207" [gnus-demon-add-handler gnus-demon-nntp-close-connections 5 nil] 4 (#$ . 5985)])
(defalias 'gnus-demon-nntp-close-connection #[nil "\300\213\207" [((byte-code "\301\302\303!\"\205 \304 \207" [nntp-last-command-time time-less-p (0 300) time-since nntp-close-server] 4))] 1])
#@55 Add daemonic scanning of mail from the mail backends.
(defalias 'gnus-demon-add-scanmail #[nil "\300\301\302\303#\207" [gnus-demon-add-handler gnus-demon-scan-mail 120 60] 4 (#$ . 6487)])
(defalias 'gnus-demon-scan-mail #[nil "\300\213\207" [((byte-code "\306\307C\211A@@\211\2053 \310\n@\311\312\313\217*\203 \314\n!\204+ \315\n!\203 \316\306\n\"\210\202 +\207" [gnus-opened-servers nnmail-fetched-sources server servers group func nil t request-scan #1=#:G88754 (byte-code ";\203\f \303!@\202 \304	!\204 \305	!\210\306\307\310\311	\n#!!)\207" [group method func gnus-find-method-for-group featurep require fboundp intern format "%s-%s"] 6) ((error)) gnus-server-opened gnus-open-server gnus-request-scan] 3))] 1])
#@58 Add daemonic scanning of new articles from all backends.
(defalias 'gnus-demon-add-rescan #[nil "\300\301\302\303#\207" [gnus-demon-add-handler gnus-demon-scan-news 120 60] 4 (#$ . 7227)])
(defalias 'gnus-demon-scan-news #[nil "\301 \302\216\303\213*\207" [win current-window-configuration ((set-window-configuration win)) ((byte-code "\212\301 \205 \212q\210\302 ))\207" [gnus-group-buffer gnus-alive-p gnus-group-get-new-news] 1))] 1])
#@57 Add daemonic updating of timestamps in empty newgroups.
(defalias 'gnus-demon-add-scan-timestamps #[nil "\300\301\302\303#\207" [gnus-demon-add-handler gnus-demon-scan-timestamps nil 30] 4 (#$ . 7674)])
#@76 Set the timestamp on all newsgroups with no unread and no ticked articles.
(defalias 'gnus-demon-scan-timestamps #[nil "\306 \205K \307 A\310\211\211\211\211A@\211\205I \f@\311\"J@\312\313\f8\236A\n\247\203 \n\314U\203 	\204 \315\316#\210\202 .\207" [gnus-newsrc-alist has-ticked unread group info newsrc gnus-alive-p current-time nil intern-soft tick 3 0 gnus-group-set-parameter timestamp cur-time gnus-newsrc-hashtb] 6 (#$ . 7883)])
(provide 'gnus-demon)
