From 59c4d5f95337d6393edb5ffe6b9ef74e4f89058f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 30 Nov 2014 18:06:19 +0200 Subject: [PATCH] Fix bug #19211 with move-end-of-line in non-interactive session. 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 | 7 +++++++ lisp/simple.el | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9a45f08b92c..726d9b02ac8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2014-11-30 Eli Zaretskii + + * 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 Stefan Monnier diff --git a/lisp/simple.el b/lisp/simple.el index 0c0e8158303..65fcf6e90b2 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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) -- 2.39.5