[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Nested sit-for's
From: |
Stefan Monnier |
Subject: |
Re: Nested sit-for's |
Date: |
Mon, 21 Aug 2006 12:14:18 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>> IIUC, the recent addition of current-idle-time by RMS was supposed to
>> fix the sit-for in jit-lock problem in a different way. But so far,
>> RMS' changes to jit-lock have not been installed... What's up???
>>
>> Someone else proposed a different change to the same part of jit-lock,
>> and I have not had time (while sufficiently alert) to study that,
>> so I don't have any idea which solution is better.
>>
>> I sent my changes to the list yesterday; what do others think about
>> them?
> I haven't fully understood either of the two approaches, but Martin's
> approach which completely avoids using sit-for in the timer handler
> looks vastly superior to me for that reason alone!
I think we could clean up the code even more by extending
run-with-idle-timer as follows:
(run-with-idle-timer SECS REPEAT FUNCTION &rest ARGS)
Perform an action the next time Emacs is idle for SECS seconds.
The action is to call function with arguments ARGS.
SECS may be an integer or a floating point number.
If REPEAT is non-nil, do the action each time Emacs has been idle for
exactly SECS seconds (that is, only once for each time Emacs becomes idle).
Additionally, if REPEAT is a number, repeat the action every REPEAT
seconds as long as Emacs stays idle.
This function returns a timer object which you can use in `cancel-timer'.
-- Stefan
- Re: Nested sit-for's, (continued)
- Re: Nested sit-for's, martin rudalics, 2006/08/17
- Re: Nested sit-for's, Kim F. Storm, 2006/08/17
- Re: Nested sit-for's, martin rudalics, 2006/08/18
- Re: Nested sit-for's, Kim F. Storm, 2006/08/18
- Re: Nested sit-for's, Chong Yidong, 2006/08/20
- Re: Nested sit-for's, Kim F. Storm, 2006/08/20
- Re: Nested sit-for's, martin rudalics, 2006/08/20
- Re: Nested sit-for's, Kim F. Storm, 2006/08/20
- Re: Nested sit-for's, Richard Stallman, 2006/08/21
- Re: Nested sit-for's, Kim F. Storm, 2006/08/21
- Re: Nested sit-for's,
Stefan Monnier <=
- Re: Nested sit-for's, martin rudalics, 2006/08/21
- Re: Nested sit-for's, Stefan Monnier, 2006/08/21
- Re: Nested sit-for's, Richard Stallman, 2006/08/22
Re: Nested sit-for's, Chong Yidong, 2006/08/17
RE: Nested sit-for's, Drew Adams, 2006/08/17