Subject: bug#26599: patch for mwheel.el

From: Tak Kunihiro <[email-masked]>
Date: Sun, 23 Apr 2017 15:13:00 +0900 (JST)

>> Is it possible to add a line that runs hook on `mwheel.el' to let me
>> do so without advice-add?
> 
> Wouldn't it be better to have a user option which would turn off
> auto-hscroll-mode without running any hooks?

Yes.  A concern is how to turn auto-hscroll-mode t back.

User decides when to set auto-scroll-mode t again by an event besides
wheel-up, -down, -left, or -down.

My picture is having a minor mode that detects the event and sets
auto-scroll-mode t again.  The minor mode would be described in a file
paired with code that sets auto-scroll-mode nil.

In a case the minor mode is written in a file outside of mwheel.el,
code that sets auto-scroll-mode nil should be on the file too.  In the
scenario hook to invokes the minor mode, is necessary.

In a case the minor mode is written in mwheel.el, hook is not
necessary.