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: martin rudalics
Subject: Re: Can we make set_point_both less expensive?
Date: Sat, 21 Mar 2015 13:31:24 +0100

>>   > 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.
>>
>> This command, I presume.
>
> The command that preceded redisplay.  "This command" is ambiguous.

Then the value of `this-command' provided it's non-nil at the time
`pre-redisplay-function' is called.  What is the position of point when
calling `pre-redisplay-function' after `scroll-bar-toolkit-scroll'?  The
one before `scroll-bar-toolkit-scroll' was called, I presume.

>>   > 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.
>>
>> Do you mean invisible text here?
>
> No, I mean positions traversed while "this command" is executed.  The
> position shown to the user is the last one of those, but how do we
> ensure that pre-redisplay-function is never run for those?

We won't I presume.  My understanding is that C code calls and will
continue to call `pre-redisplay-function' regardless of whether "point
is in a position that is not supposed to be visible by the user".  It
will simply try to come up with the best position of point it can
provide at that moment.

martin



reply via email to

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