(dgnushack-make-manifest): Fix info directory.
[elisp/gnus.git-] / lisp / gnus-demon.el
index 75b8765..6a77b8e 100644 (file)
@@ -34,7 +34,7 @@
 (require 'nnmail)
 (require 'gnus-util)
 (eval-and-compile
-  (if (string-match "XEmacs" (emacs-version))
+  (if (featurep 'xemacs)
       (require 'itimer)
     (require 'timer)))
 
@@ -152,7 +152,7 @@ time Emacs has been idle for IDLE `gnus-demon-timestep's."
            (nowParts (decode-time now))
            ;; obtain THEN as discrete components
            (thenParts (parse-time-string time))
-           (thenHour (elt thenParts 0))
+           (thenHour (elt thenParts 2))
            (thenMin (elt thenParts 1))
            ;; convert time as elements into number of seconds since EPOCH.
            (then (encode-time 0
@@ -191,6 +191,10 @@ time Emacs has been idle for IDLE `gnus-demon-timestep's."
     ;; sufficiently ripe.
     (let ((handlers gnus-demon-handler-state)
          (gnus-inhibit-demon t)
+         ;; Try to avoid dialog boxes, e.g. by Mailcrypt.
+         ;; Unfortunately, Emacs 20's `message-or-box...' doesn't
+         ;; obey `use-dialog-box'.
+         use-dialog-box (last-nonmenu-event 10)
          handler time idle)
       (while handlers
        (setq handler (pop handlers))