emacs-devel
[Top][All Lists]
Advanced

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

Re: Can we make set_point_both less expensive?


From: Eli Zaretskii
Subject: Re: Can we make set_point_both less expensive?
Date: Mon, 23 Mar 2015 17:31:40 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden,  address@hidden,  address@hidden
> Date: Sun, 22 Mar 2015 18:23:24 -0400
> 
> >> It's right after an incomplete redisplay, and right before the
> >> next redisplay.  I count this as still "before redisplay" since it's
> >> immediately followed by redisplay.
> > It is "during redisplay" in the sense that the position of cursor was
> > not yet finalized, and you already move it, perhaps for no good
> > reason.
> 
> I don't deny it can be described differently.  I.e. sometimes it
> happens during redisplay, sometimes it happens in a sit-for, sometimes
> it happens at the end of a command.  But always it happens right
> before a redisplay.

I don't understand what you are trying to say.  Every single moment in
Emacs is before _some_ redisplay, that's true, but I don't believe you
meant that.

Otherwise, running the function before redisplay finished its job and
returned after marking the window up-to-day is bound to catch
incorrect position of point/cursor sometimes.

> > Ah, I misunderstood your question.  The answer for your question is
> > "abort redisplay cycle after moving point out of intangible".
> 
> In which case you risk inf-looping (and hence need to detect/prevent
> it), same as with pre-redisplay-function.

No, because the code to abort redisplay was written long ago and is
well tested, by time if nothing else.



reply via email to

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