diff options
Diffstat (limited to 'lisp/simple.el')
| -rw-r--r-- | lisp/simple.el | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 639021bcb95..be9bded5382 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3162,12 +3162,12 @@ and more reliable (no dependence on goal column, etc.)." | |||
| 3162 | (let ((abbrev-mode nil)) | 3162 | (let ((abbrev-mode nil)) |
| 3163 | (end-of-line) | 3163 | (end-of-line) |
| 3164 | (insert "\n")) | 3164 | (insert "\n")) |
| 3165 | (line-move arg)) | 3165 | (line-move arg nil nil t)) |
| 3166 | (if (interactive-p) | 3166 | (if (interactive-p) |
| 3167 | (condition-case nil | 3167 | (condition-case nil |
| 3168 | (line-move arg) | 3168 | (line-move arg nil nil t) |
| 3169 | ((beginning-of-buffer end-of-buffer) (ding))) | 3169 | ((beginning-of-buffer end-of-buffer) (ding))) |
| 3170 | (line-move arg))) | 3170 | (line-move arg nil nil t))) |
| 3171 | nil) | 3171 | nil) |
| 3172 | 3172 | ||
| 3173 | (defun previous-line (&optional arg) | 3173 | (defun previous-line (&optional arg) |
| @@ -3190,9 +3190,9 @@ to use and more reliable (no dependence on goal column, etc.)." | |||
| 3190 | (or arg (setq arg 1)) | 3190 | (or arg (setq arg 1)) |
| 3191 | (if (interactive-p) | 3191 | (if (interactive-p) |
| 3192 | (condition-case nil | 3192 | (condition-case nil |
| 3193 | (line-move (- arg)) | 3193 | (line-move (- arg) nil nil t) |
| 3194 | ((beginning-of-buffer end-of-buffer) (ding))) | 3194 | ((beginning-of-buffer end-of-buffer) (ding))) |
| 3195 | (line-move (- arg))) | 3195 | (line-move (- arg) nil nil t)) |
| 3196 | nil) | 3196 | nil) |
| 3197 | 3197 | ||
| 3198 | (defcustom track-eol nil | 3198 | (defcustom track-eol nil |
| @@ -3231,8 +3231,8 @@ Outline mode sets this." | |||
| 3231 | (assq prop buffer-invisibility-spec))))) | 3231 | (assq prop buffer-invisibility-spec))))) |
| 3232 | 3232 | ||
| 3233 | ;; Perform vertical scrolling of tall images if necessary. | 3233 | ;; Perform vertical scrolling of tall images if necessary. |
| 3234 | (defun line-move (arg &optional noerror to-end) | 3234 | (defun line-move (arg &optional noerror to-end try-vscroll) |
| 3235 | (if auto-window-vscroll | 3235 | (if (and auto-window-vscroll try-vscroll) |
| 3236 | (let ((forward (> arg 0)) | 3236 | (let ((forward (> arg 0)) |
| 3237 | (part (nth 2 (pos-visible-in-window-p (point) nil t)))) | 3237 | (part (nth 2 (pos-visible-in-window-p (point) nil t)))) |
| 3238 | (if (and (consp part) | 3238 | (if (and (consp part) |
| @@ -3248,7 +3248,14 @@ Outline mode sets this." | |||
| 3248 | (* (frame-char-height) (- arg)))))) | 3248 | (* (frame-char-height) (- arg)))))) |
| 3249 | t) | 3249 | t) |
| 3250 | (set-window-vscroll nil 0) | 3250 | (set-window-vscroll nil 0) |
| 3251 | (line-move-1 arg noerror to-end))) | 3251 | (when (line-move-1 arg noerror to-end) |
| 3252 | (sit-for 0) | ||
| 3253 | (if (and (not forward) | ||
| 3254 | (setq part (nth 2 (pos-visible-in-window-p | ||
| 3255 | (line-beginning-position) nil t))) | ||
| 3256 | (> (cdr part) 0)) | ||
| 3257 | (set-window-vscroll nil (cdr part) t)) | ||
| 3258 | t))) | ||
| 3252 | (line-move-1 arg noerror to-end))) | 3259 | (line-move-1 arg noerror to-end))) |
| 3253 | 3260 | ||
| 3254 | ;; This is the guts of next-line and previous-line. | 3261 | ;; This is the guts of next-line and previous-line. |