aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el36
1 files changed, 19 insertions, 17 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 09fe1807d8f..67f6e4eedf7 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4405,23 +4405,25 @@ lines."
4405;; a cleaner solution to the problem of making C-n do something 4405;; a cleaner solution to the problem of making C-n do something
4406;; useful given a tall image. 4406;; useful given a tall image.
4407(defun line-move (arg &optional noerror to-end try-vscroll) 4407(defun line-move (arg &optional noerror to-end try-vscroll)
4408 (unless (and auto-window-vscroll try-vscroll 4408 (if noninteractive
4409 ;; Only vscroll for single line moves 4409 (forward-line arg)
4410 (= (abs arg) 1) 4410 (unless (and auto-window-vscroll try-vscroll
4411 ;; But don't vscroll in a keyboard macro. 4411 ;; Only vscroll for single line moves
4412 (not defining-kbd-macro) 4412 (= (abs arg) 1)
4413 (not executing-kbd-macro) 4413 ;; But don't vscroll in a keyboard macro.
4414 (line-move-partial arg noerror to-end)) 4414 (not defining-kbd-macro)
4415 (set-window-vscroll nil 0 t) 4415 (not executing-kbd-macro)
4416 (if (and line-move-visual 4416 (line-move-partial arg noerror to-end))
4417 ;; Display-based column are incompatible with goal-column. 4417 (set-window-vscroll nil 0 t)
4418 (not goal-column) 4418 (if (and line-move-visual
4419 ;; When the text in the window is scrolled to the left, 4419 ;; Display-based column are incompatible with goal-column.
4420 ;; display-based motion doesn't make sense (because each 4420 (not goal-column)
4421 ;; logical line occupies exactly one screen line). 4421 ;; When the text in the window is scrolled to the left,
4422 (not (> (window-hscroll) 0))) 4422 ;; display-based motion doesn't make sense (because each
4423 (line-move-visual arg noerror) 4423 ;; logical line occupies exactly one screen line).
4424 (line-move-1 arg noerror to-end)))) 4424 (not (> (window-hscroll) 0)))
4425 (line-move-visual arg noerror)
4426 (line-move-1 arg noerror to-end)))))
4425 4427
4426;; Display-based alternative to line-move-1. 4428;; Display-based alternative to line-move-1.
4427;; Arg says how many lines to move. The value is t if we can move the 4429;; Arg says how many lines to move. The value is t if we can move the