Use buffer-local variables to fix scrolling.