3158 |
(let ((abbrev-mode nil)) |
(let ((abbrev-mode nil)) |
3159 |
(end-of-line) |
(end-of-line) |
3160 |
(insert "\n")) |
(insert "\n")) |
3161 |
(line-move arg)) |
(line-move arg nil nil t)) |
3162 |
(if (interactive-p) |
(if (interactive-p) |
3163 |
(condition-case nil |
(condition-case nil |
3164 |
(line-move arg) |
(line-move arg nil nil t) |
3165 |
((beginning-of-buffer end-of-buffer) (ding))) |
((beginning-of-buffer end-of-buffer) (ding))) |
3166 |
(line-move arg))) |
(line-move arg nil nil t))) |
3167 |
nil) |
nil) |
3168 |
|
|
3169 |
(defun previous-line (&optional arg) |
(defun previous-line (&optional arg) |
3186 |
(or arg (setq arg 1)) |
(or arg (setq arg 1)) |
3187 |
(if (interactive-p) |
(if (interactive-p) |
3188 |
(condition-case nil |
(condition-case nil |
3189 |
(line-move (- arg)) |
(line-move (- arg) nil nil t) |
3190 |
((beginning-of-buffer end-of-buffer) (ding))) |
((beginning-of-buffer end-of-buffer) (ding))) |
3191 |
(line-move (- arg))) |
(line-move (- arg) nil nil t)) |
3192 |
nil) |
nil) |
3193 |
|
|
3194 |
(defcustom track-eol nil |
(defcustom track-eol nil |
3227 |
(assq prop buffer-invisibility-spec))))) |
(assq prop buffer-invisibility-spec))))) |
3228 |
|
|
3229 |
;; Perform vertical scrolling of tall images if necessary. |
;; Perform vertical scrolling of tall images if necessary. |
3230 |
(defun line-move (arg &optional noerror to-end) |
(defun line-move (arg &optional noerror to-end try-vscroll) |
3231 |
(if auto-window-vscroll |
(if (and auto-window-vscroll try-vscroll) |
3232 |
(let ((forward (> arg 0)) |
(let ((forward (> arg 0)) |
3233 |
(part (nth 2 (pos-visible-in-window-p (point) nil t)))) |
(part (nth 2 (pos-visible-in-window-p (point) nil t)))) |
3234 |
(if (and (consp part) |
(if (and (consp part) |
3244 |
(* (frame-char-height) (- arg)))))) |
(* (frame-char-height) (- arg)))))) |
3245 |
t) |
t) |
3246 |
(set-window-vscroll nil 0) |
(set-window-vscroll nil 0) |
3247 |
(line-move-1 arg noerror to-end))) |
(when (line-move-1 arg noerror to-end) |
3248 |
|
(sit-for 0) |
3249 |
|
(if (and (not forward) |
3250 |
|
(setq part (nth 2 (pos-visible-in-window-p |
3251 |
|
(line-beginning-position) nil t))) |
3252 |
|
(> (cdr part) 0)) |
3253 |
|
(set-window-vscroll nil (cdr part) t)) |
3254 |
|
t))) |
3255 |
(line-move-1 arg noerror to-end))) |
(line-move-1 arg noerror to-end))) |
3256 |
|
|
3257 |
;; This is the guts of next-line and previous-line. |
;; This is the guts of next-line and previous-line. |