Subject: Re: bug#15045: Point jumps inappropriately around time of Semantic lexing

From: Eli Zaretskii <[email-masked]>
Date: Tue, 15 Oct 2013 21:48:23 +0300

> Date: Tue, 15 Oct 2013 13:08:58 -0400
> From: Barry OReilly <[email-masked]>
> Cc: Stefan Monnier <[email-masked]>, David Engster <[email-masked]>, 
> 	[email-masked], Eric Ludlam <[email-masked]>
> 
>   (defun sit-for (seconds &optional nodisp obsolete)
>     [...]
>     (cond
>      [...]
>      ((input-pending-p)
>       nil)
>      ((<= seconds 0)
>       (or nodisp (redisplay)))
>      [...]
> 
> I considered whether (<= seconds 0) could fall through to the t case
> instead.

Maybe I'm missing something, but wouldn't that bypass redisplay?
Currently, (sit-for 0) is a very popular method to trigger redisplay;
changing that _will_ bite a lot of code out there.

> The read_char function has a complex implementation, so it's not
> clear doing so wouldn't change behavior.

Are you assuming that read_char always redisplays?  That's not true,
AFAIK.

> Is there another Lisp function that does timer_check and little else,
> which the (<= seconds 0) case could call? Should I write a new subr
> for it?

Not sure I understand the question, sorry.