Subject: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window

From: Eli Zaretskii <[email-masked]>
Date: Sat, 27 Sep 2014 20:35:21 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: martin rudalics <[email-masked]>,  [email-masked],  [email-masked]
> Date: Sat, 27 Sep 2014 13:25:04 -0400
> 
> > This says point doesn't move, which I don't understand how can
> > happen.  forward-line doesn't care about anything except moving point
> > to the next line.
> 
> That's odd, indeed.  It can be explained if the redisplay ends up moving
> point to keep it in the window (instead of scrolling the window to
> follow point).

I don't think this can explain it: forward-line works on the buffer,
and the location of point is (or should be, see below) printed
_before_ Emacs enters redisplay, as part of running the command that
called forward-line.

This, of course, assumes that what Martin did was equivalent to the
below:

  (defun my-fwd-line ()
    (interactive)
    (forward-line 1)
    (message "%s" (point)))

  (define-key global-map [down] 'my-fwd-line)