]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #19211 with move-end-of-line in non-interactive session.
authorEli Zaretskii <eliz@gnu.org>
Sun, 30 Nov 2014 16:06:19 +0000 (18:06 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sun, 30 Nov 2014 16:06:19 +0000 (18:06 +0200)
 lisp/simple.el (line-move): If noninteractive, call line-move-1, not
 forward-line, since the former is compatible with line-move-visual
 both in terms of the column to which it moves and the return
 value.

lisp/ChangeLog
lisp/simple.el

index 9a45f08b92c6e7a93793094944a62e9cff79a4f7..726d9b02ac8ca63cf81f39a352ab7362c86c5309 100644 (file)
@@ -1,3 +1,10 @@
+2014-11-30  Eli Zaretskii  <eliz@gnu.org>
+
+       * simple.el (line-move): If noninteractive, call line-move-1, not
+       forward-line, since the former is compatible with line-move-visual
+       both in terms of the column to which it moves and the return
+       value.  (Bug#19211)
+
 2014-11-27  Stephen Berman  <stephen.berman@gmx.net>
            Stefan Monnier  <monnier@iro.umontreal.ca>
 
index 0c0e81583037a313bcb871a2a8fd690f9b68c4a4..65fcf6e90b2076cd9921abdce9bbc74efb3033b0 100644 (file)
@@ -5191,7 +5191,7 @@ TRY-VSCROLL controls whether to vscroll tall lines: if either
 `auto-window-vscroll' or TRY-VSCROLL is nil, this function will
 not vscroll."
   (if noninteractive
-      (forward-line arg)
+      (line-move-1 arg noerror to-end)
     (unless (and auto-window-vscroll try-vscroll
                 ;; Only vscroll for single line moves
                 (= (abs arg) 1)