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: Sat, 21 Mar 2015 16:42:54 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
> Date: Sat, 21 Mar 2015 09:59:35 -0400
> 
> >> > discussed.  Stefan wants redisplay to move point also in the case
> >> > where some Lisp moved point and entered a region of buffer positions
> >> > that has a certain text property.
> >> Yes and no: I want pre-redisplay-function to do that.
> > This will only work if pre-redisplay-function is called in a way that
> > guarantees it will catch the position of point after the previous
> > command.
> 
> I think I don't understand what you're saying:
> pre-redisplay-function is called at the beginning of redisplay, so of
> course it's called "after the previous command".

But in the course of this discussion, you suggested it to be called in
other places as well.

> > Another, related, requirement is that we never call
> > pre-redisplay-function when point is in a position that is not
> > supposed to be visible by the user.
> 
> Again I don't understand.

My concern is again for your suggestions to call it under additional
circumstances.

> > Overall, it sounds like a non-trivial deviation from the original
> > purpose of pre-redisplay-function, as I understand it.
> 
> I assure you it isn't: `cursor-intangible' was very much in my mind
> while I was implementing this new feature.

Maybe so, but are you sure it is used for purposes that are similar to
to what you envisioned?  I am not, based on discussions since its
introduction where it was suggested to use it.

> > What I _am_ saying is that only redisplay, in its last part, knows
> > where the cursor will be positioned.
> 
> Of course: pre-redisplay-function only has control of `point', not over
> the cursor.  So it should move point away from the `cursor-intangible'
> property.  The difference between point and the place where the cursor
> is drawn on screen is not really relevant to `cursor-intangible'.

If I now mention, again, that redisplay can move point, we would be
going in circles.  Is that what you want?



reply via email to

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