Subject: bug#26599: patch for mwheel.el

From: Eli Zaretskii <[email-masked]>
Date: Wed, 26 Apr 2017 13:50:33 +0300

> From: Tak Kunihiro <[email-masked]>
> Date: Wed, 26 Apr 2017 15:08:42 +0900
> Cc: Kunihiro Tak <[email-masked]>,
>  [email-masked]
> 
> Let’s consider a buffer consists of very long lines and an empty line.
> Point starts from A with auto-hscroll-mode t.
> 
> 0000..0000 A
> 0000..0000 I
> C          B
> D 00..0000 Z
> 
> Point reaches to B by scroll up and as soon as auto-hscroll-mode
> is set to t, scope will be shifted to point C. Another scrolling
> up moves point to D instead of Z.

I think I'm still missing something, because in my testing, even if
window is hscrolled to show point at C, the next scroll "undoes" that
hscroll to show point at Z.  That's because Emacs tries to keep point
in the same column while scrolling.  So please present a full recipe
which exhibits the problem, including the file to visit and the
commands to invoke.

Thanks.