3183 |
(defun line-move (arg &optional noerror to-end) |
(defun line-move (arg &optional noerror to-end) |
3184 |
(if auto-window-vscroll |
(if auto-window-vscroll |
3185 |
(let ((forward (> arg 0)) |
(let ((forward (> arg 0)) |
3186 |
(pvis (pos-visible-in-window-p (point) nil t))) |
(part (nth 2 (pos-visible-in-window-p (point) nil t)))) |
3187 |
(if (and pvis (null (nth 2 pvis)) |
(if (and (consp part) |
3188 |
(> (nth (if forward 4 3) pvis) 0)) |
(> (setq part (if forward (cdr part) (car part))) 0)) |
3189 |
(set-window-vscroll nil |
(set-window-vscroll nil |
3190 |
(if forward |
(if forward |
3191 |
(+ (window-vscroll nil t) |
(+ (window-vscroll nil t) |
3192 |
(min (nth 4 pvis) |
(min part |
3193 |
(* (frame-char-height) arg))) |
(* (frame-char-height) arg))) |
3194 |
(max 0 |
(max 0 |
3195 |
(- (window-vscroll nil t) |
(- (window-vscroll nil t) |
3196 |
(min (nth 3 pvis) |
(min part |
3197 |
(* (frame-char-height) (- arg)))))) |
(* (frame-char-height) (- arg)))))) |
3198 |
t) |
t) |
3199 |
(set-window-vscroll nil 0) |
(set-window-vscroll nil 0) |