Subject: bug#34723: 27.0.50; customize and improve diff-mode recentering

From: [email-masked] (Charles A. Roelli)
Date: Tue, 05 Mar 2019 20:49:13 +0100

> Date: Tue, 05 Mar 2019 17:46:11 +0200
> From: Eli Zaretskii <[email-masked]>
> CC: [email-masked]
> 
> I've read this description and that in bug#32991, several times, and I
> still cannot figure out whether you are saying that there's a problem
> in recentering per se (and in the related redisplay code), or you are
> saying that diff-mode does something in its application code that
> indirectly and inadvertently causes unwarranted recentering.  Could
> you please clarify which is the case here?  Depending on that, the
> solution should be either in diff-mode or in the display engine
> (however, I have hard time believing that we have use cases where the
> display engine ignores scroll-related variables).
> 
> Thanks.

The function diff-hunk-next is defined using the macro
easy-mmode-define-navigation, and its definition calls (recenter '(0))
too liberally.  The call also ignores settings like
'scroll-conservatively'.  The display engine is not at fault, and we
should be able to fix the issue either in easy-mmode or in diff-mode.