diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/simple.el | 36 |
2 files changed, 24 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eff89ba08c0..054b3ca5f47 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-04-18 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * simple.el (line-move): Use forward-line if in batch mode | ||
| 4 | (Bug#11053). | ||
| 5 | |||
| 1 | 2012-04-18 Christopher Schmidt <christopher@ch.ristopher.com> | 6 | 2012-04-18 Christopher Schmidt <christopher@ch.ristopher.com> |
| 2 | 7 | ||
| 3 | * files.el (after-find-file): Do not try to add a final newline if | 8 | * files.el (after-find-file): Do not try to add a final newline if |
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 |