Hey #Emacs friends: When I scroll to the bottom of a buffer, I want the scrolling to stop as soon as the end of the buffer is visible (like in … every other app). I thought I'd managed to implement this some years ago, but I recently discovered that this little nightmare occasionally hangs my GUI emacs and makes it unusable, on Linux as well as macOS. Do not use this example, it will hang your Emacs! But does anyone know *why*:
https://gist.github.com/glyph/a8e8432141e620eb8288fbc21d770df8