emacs-devel
[Top][All Lists]
Advanced

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

Re: jit lock sit-for provokes redisplay provokes imenu


From: David Kastrup
Subject: Re: jit lock sit-for provokes redisplay provokes imenu
Date: Thu, 27 Jul 2006 00:48:15 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     >   return BUF_SAVE_MODIFF (buf) < BUF_CHARS_MODIFF (buf) ? Qt : Qnil;
>
>     Isn't this vulnerable to problems when MODIFF wraps around?
>
> If the buffer is modified 1000 times a second, with never a pause, it
> could wrap around in 24 days.  If we make the field unsigned, that
> would increase to 48 days.
>
> However, the Lisp level representation of this (returned by
> buffer-modified-tick) is 3 bits smaller, so it would wrap around in
> just 6 days.
>
> We could declare the fields long long at the C level, and then they
> would never wrap around (assuming there are no compilers that barf on
> long long.)  But we would still have the problem at the Lisp level.
>
> It isn't clear how we could fix this.  Meanwhile,
> in practice, I think the problem ever happens.
> So I think we should deal with it after the release.

Wouldn't it be safer if such counts would be compared for equality
only?  That way, a wrapping counter will cause a one-time problem only
once he completely catches up with a non-wrapped counter, instead of
causing a permanent problem _until_ he catches up.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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