]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix 'vertical-motion' in non-interactive sessions
authorEli Zaretskii <eliz@gnu.org>
Sun, 10 Jul 2016 19:06:57 +0000 (22:06 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 10 Jul 2016 19:06:57 +0000 (22:06 +0300)
* src/indent.c (Fvertical_motion): Don't return uninitialized
value in non-interactive session.  This fixes random errors in
batch mode, see
http://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00609.html
and
http://lists.gnu.org/archive/html/emacs-devel/2016-07/msg00500.html
for the details.

src/indent.c

index 0ef8903501d6d43a977cddf8685f36fa3cb211db..578dac83df5da8ec7cb760e9a792dc31534bc93f 100644 (file)
@@ -2027,6 +2027,7 @@ whether or not it is currently displayed in some window.  */)
       struct position pos;
       pos = *vmotion (PT, PT_BYTE, XINT (lines), w);
       SET_PT_BOTH (pos.bufpos, pos.bytepos);
+      it.vpos = pos.vpos;
     }
   else
     {