emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sit-for and idle timers


From: Chong Yidong
Subject: Re: sit-for and idle timers
Date: Mon, 14 Aug 2006 15:47:07 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> Why do these timer functions call sit-for?  It is a strange thing for
> a timer to wait.  It should reschedule itself instead.  What are they
> really trying to do?

It varies from situation to situation.  For example, jit-lock uses the
idle timer function jit-lock-stealth-fontify, which calls sit-for.
The goal, in that case, is to wait a certain amount of time between
fontifying chunks.

>     I think the solution is to avoid calling timer_start_idle when
>     read-event is given a non-nil SECONDS argument.  What do people think?
>
> That is definitely not right.  Emacs really is idle when it reads an event,
> even if there is a timeout.
>
> So my conclusion is that when read-event is called from an idle timer,
> it should not change the state to idle at the beginning, and it should
> not change the state away from idle at the end.
>
> Does this change fix it?

I already checked in a different change to keyboard.c before your
email came in.  But I think your version makes more sense.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]