On Fri, Oct 22 2010, Stephen J. Turnbull wrote:
What does current-idle-timer do?
It returns the time since when Emacs is idle, or nil if it's not idle.
> run-with-idle-timer is not usable because it only run once by
idle
> session.
;; probably you want to wrap this up in a macro and use a gensym
;; instead of a global symbol
(defvar timer-foo-timer nil)
(defun timer-foo ()
(do-foo)
(when (itimerp timer-foo-timer) (delete-itimer itimer-foo-timer))
(setq timer-foo-timer (run-with-idle-timer secs nil #'timer-foo)))
I don't think this will work. Or it's not secs, but rather
(+ secs (current-time)), isn't it?
And with that I'm not sure it's really realiable, is it?
Thanks Stephen,
--
Julien Danjou
// ᐰ <julien(a)danjou.info>
http://julien.danjou.info
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta