(auth-source-netrc-parse): Accept a number as the port spec, too.
[gnus] / lisp / gnus-demon.el
index c80963e..2a45b93 100644 (file)
@@ -1,7 +1,6 @@
 ;;; gnus-demon.el --- daemonic Gnus behavior
 
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2011 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -32,7 +31,6 @@
 (require 'nnheader)
 (require 'nntp)
 (require 'nnmail)
-(require 'gnus-util)
 
 (defgroup gnus-demon nil
   "Demonic behavior."
@@ -105,7 +103,7 @@ Emacs has been idle for IDLE `gnus-demon-timestep's."
   (unless gnus-inhibit-demon
     (when (or (not idle)
               (<= idle (gnus-demon-idle-since)))
-      (gnus-with-local-quit
+      (with-local-quit
        (ignore-errors
          (funcall func))))))
 
@@ -122,18 +120,18 @@ Emacs has been idle for IDLE `gnus-demon-timestep's."
            ;; If t, replace by 1
            (time (cond ((eq time t)
                         gnus-demon-timestep)
-                       ((null time))
+                       ((null time) nil)
                        (t (* time gnus-demon-timestep))))
            (timer
             (cond
              ;; (func number t)
              ;; Call when Emacs has been idle for `time'
              ((and (numberp time) (eq idle t))
-              (run-with-timer t time 'gnus-demon-run-callback func time))
+              (run-with-timer time time 'gnus-demon-run-callback func time))
              ;; (func number number)
              ;; Call every `time' when Emacs has been idle for `idle'
              ((and (numberp time) (numberp idle))
-              (run-with-timer t time 'gnus-demon-run-callback func idle))
+              (run-with-timer time time 'gnus-demon-run-callback func idle))
              ;; (func nil number)
              ;; Only call when Emacs has been idle for `idle'
              ((and (null time) (numberp idle))