+2004-07-25 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * wl-util.el (wl-biff-start): Don't call `wl-biff-check-folders'
+ immediately.
+ * wl.el (wl): Call `wl-biff-check-folders' explicitly.
+ (wl-toggle-plugged): Ditto.
+
+ * wl-vars.el (wl-biff-use-idle-timer): New variable.
+ * wl-util.el (wl-biff-start): Use idle timer if
+ `wl-biff-use-idle-timer' is non-nil.
+
2004-07-21 Yoichi NAKAYAMA <yoichi@geiin.org>
* wl-highlight.el (wl-highlight-message): Fix description.
(defun wl-biff-start ()
(wl-biff-stop)
(when wl-biff-check-folder-list
- (wl-biff-check-folders)
(start-itimer wl-biff-timer-name 'wl-biff-check-folders
- wl-biff-check-interval wl-biff-check-interval))))
+ wl-biff-check-interval wl-biff-check-interval
+ wl-biff-use-idle-timer))))
((and (condition-case nil (require 'timer) (error nil));; FSFmacs 19+
(fboundp 'timer-activate))
(defun wl-biff-start ()
(require 'timer)
(when wl-biff-check-folder-list
- (wl-biff-check-folders)
- (if (get 'wl-biff 'timer)
- (timer-activate (get 'wl-biff 'timer))
- (put 'wl-biff 'timer (run-at-time
+ (if wl-biff-use-idle-timer
+ (if (get 'wl-biff 'timer)
+ (progn (timer-set-idle-time (get 'wl-biff 'timer)
+ wl-biff-check-interval t)
+ (timer-activate-when-idle (get 'wl-biff 'timer)))
+ (put 'wl-biff 'timer
+ (run-with-idle-timer
+ wl-biff-check-interval t 'wl-biff-event-handler)))
+ (if (get 'wl-biff 'timer)
+ (progn
+ (timer-set-time (get 'wl-biff 'timer)
(timer-next-integral-multiple-of-time
(current-time) wl-biff-check-interval)
- wl-biff-check-interval
- 'wl-biff-event-handler)))))
+ wl-biff-check-interval)
+ (timer-activate (get 'wl-biff 'timer)))
+ (put 'wl-biff 'timer
+ (run-at-time
+ (timer-next-integral-multiple-of-time
+ (current-time) wl-biff-check-interval)
+ wl-biff-check-interval
+ 'wl-biff-event-handler))))))
(defun-maybe timer-next-integral-multiple-of-time (time secs)
"Yield the next value after TIME that is an integral multiple of SECS.
(progn
;; flush queue!!
(elmo-dop-queue-flush)
- (unless queue-flush-only (wl-biff-start))
+ (unless queue-flush-only
+ (when wl-biff-check-folder-list
+ (wl-biff-check-folders)
+ (wl-biff-start)))
(if (and wl-draft-enable-queuing
wl-auto-flush-queue)
(wl-draft-queue-flush))
(unless arg
(run-hooks 'wl-auto-check-folder-pre-hook)
(wl-folder-auto-check)
- (run-hooks 'wl-auto-check-folder-hook))
- (unless arg (wl-biff-start)))
+ (run-hooks 'wl-auto-check-folder-hook)))
(error
(if (buffer-live-p demo-buf)
(kill-buffer demo-buf))
(signal (car obj)(cdr obj)))
(quit))
+ (when wl-biff-check-folder-list
+ (unless arg (wl-biff-check-folders))
+ (wl-biff-start))
(if (buffer-live-p demo-buf)
(kill-buffer demo-buf)))
(run-hooks 'wl-hook))