> `(defadvice ,f (after emacspeak pre act comp)
> (message "scroll advice: start = %d end = %d diff = %d"
> (window-start)
> (window-end)
> (- (window-end) (window-start))))))
I think this may return outdated values for `window-end` because it is
run before the window end position has been recomputed by redisplay.
If that's not what you want, then you need to pass non-nil value for the
`update` argument.
Thanks Stefan, you nailed it. That was exactly the problem. I should have spotted it when I checked the docs for window-end.