Scrolling and follow-mode
Alan Mackenzie <acm <at> muc.de>
2014-04-21 16:17:51 GMT
Hi, Anders, hi, Emacs.
With follow-mode enabled, the functions follow-scroll-up and
follow-scroll-down don't work very well when given a numerical argument.
In follow-scroll-up, the flag follow-internal-force-redisplay gets set,
which causes the post-command-hook function (a) to bypass the code which
selects the window to put point in; (b) to force redisplay to rescroll
the current window. Both of these are undesirable when point is near a
boundary of one window, and should pass into the adjacent window on the
I have fixed this by causing the two scrolling functions to set a flag
which causes follow-adjust-window to align its windows as its first
action, then allowing it to select the appropriate window for point with
the existing code. There are one or two minor changes too.
Comments on this fix are welcome. Here is the patch (based on the
recent trunk revision 116992.
*** emacs/emacs.bzr/trunk/lisp/follow.el 2014-02-15 19:53:57.000000000 +0000
--- follow.el 2014-04-21 16:15:28.000000000 +0000
*** 347,352 ****
--- 347,355 ----
(defvar follow-windows-start-end-cache nil
"Cache used by `follow-window-start-end'.")
+ (defvar follow-fixed-window nil
+ "When non-nil, the window which must not be scrolled.