emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 51f0ccc: Put follow-mode's engine on pre-redisp


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 51f0ccc: Put follow-mode's engine on pre-redisplay-hook instead of post-command-hook
Date: Wed, 03 Oct 2018 09:52:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> > +;; The magic little box. This function was formerly called after every
>> > +;; command.  It is now called before each redisplay operation (see
>> > +;; `follow-pre-redisplay-function' above), and at the end of several
>> > +;; search/replace commands.  It retains its historical name.
>> I wonder why this is still needed.
> There are interfaces like `isearch-update-post-hook' that need a
> function with no arguments.  Isearch calls this hook at the end of a
> search operation, and this allows follow-mode to resynchronise the
> windows before a redisplay.
>
> I tried removing this interface, hoping that the pre-redisplay-function
> would do everything properly anyway, but it didn't - a search caused the
> LH window to scroll rather than moving point to the RH window.  Also the
> windows have to be aligned before lazy highlighting takes place.  So
> `isearch-update-post-hook' and friends stay.

Thanks.  A comment explaining why these hooks are still used would be very
welcome (apparently, we don't know the deep reason why, but you can
mention the known test cases where it was found to be needed (e.g. what
you just wrote)).


        Stefan




reply via email to

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