diff options
| author | Kim F. Storm | 2005-01-22 01:44:56 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-01-22 01:44:56 +0000 |
| commit | 16c2f92f01ba1eb18a8f5fcfc9efb4243848a512 (patch) | |
| tree | 26ea406d5a6ccbd3c68605793c77e454d44a1a03 | |
| parent | d00e399ac9e1c0184a888846ea3fcd511edb7a82 (diff) | |
| download | emacs-16c2f92f01ba1eb18a8f5fcfc9efb4243848a512.tar.gz emacs-16c2f92f01ba1eb18a8f5fcfc9efb4243848a512.zip | |
(line-move-1): Rename from line-move.
(line-move): New function that adjusts vscroll for partially
visible rows, and calls line-move-1 otherwise.
| -rw-r--r-- | lisp/simple.el | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index fbcb776c7dc..e2476577fe3 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3179,10 +3179,31 @@ Outline mode sets this." | |||
| 3179 | (or (memq prop buffer-invisibility-spec) | 3179 | (or (memq prop buffer-invisibility-spec) |
| 3180 | (assq prop buffer-invisibility-spec))))) | 3180 | (assq prop buffer-invisibility-spec))))) |
| 3181 | 3181 | ||
| 3182 | ;; Perform vertical scrolling of tall images if necessary. | ||
| 3183 | (defun line-move (arg &optional noerror to-end) | ||
| 3184 | (if auto-window-vscroll | ||
| 3185 | (let ((forward (> arg 0)) | ||
| 3186 | (pvis (pos-visible-in-window-p (window-start) nil t))) | ||
| 3187 | (if (and pvis (null (nth 2 pvis)) | ||
| 3188 | (> (nth (if forward 4 3) pvis) 0)) | ||
| 3189 | (set-window-vscroll nil | ||
| 3190 | (if forward | ||
| 3191 | (+ (window-vscroll nil t) | ||
| 3192 | (min (nth 4 pvis) | ||
| 3193 | (* (frame-char-height) arg))) | ||
| 3194 | (max 0 | ||
| 3195 | (- (window-vscroll nil t) | ||
| 3196 | (min (nth 3 pvis) | ||
| 3197 | (* (frame-char-height) (- arg)))))) | ||
| 3198 | t) | ||
| 3199 | (set-window-vscroll nil 0) | ||
| 3200 | (line-move-1 arg noerror to-end))) | ||
| 3201 | (line-move-1 arg noerror to-end))) | ||
| 3202 | |||
| 3182 | ;; This is the guts of next-line and previous-line. | 3203 | ;; This is the guts of next-line and previous-line. |
| 3183 | ;; Arg says how many lines to move. | 3204 | ;; Arg says how many lines to move. |
| 3184 | ;; The value is t if we can move the specified number of lines. | 3205 | ;; The value is t if we can move the specified number of lines. |
| 3185 | (defun line-move (arg &optional noerror to-end) | 3206 | (defun line-move-1 (arg &optional noerror to-end) |
| 3186 | ;; Don't run any point-motion hooks, and disregard intangibility, | 3207 | ;; Don't run any point-motion hooks, and disregard intangibility, |
| 3187 | ;; for intermediate positions. | 3208 | ;; for intermediate positions. |
| 3188 | (let ((inhibit-point-motion-hooks t) | 3209 | (let ((inhibit-point-motion-hooks t) |