Mercurial > emacs
comparison lisp/simple.el @ 59680:1d33b3da1157
(line-move-1): Rename from line-move.
(line-move): New function that adjusts vscroll for partially
visible rows, and calls line-move-1 otherwise.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Sat, 22 Jan 2005 01:44:56 +0000 |
parents | 48b06baddb8a |
children | 815c3e98edef 6d92d69fae33 |
comparison
equal
deleted
inserted
replaced
59679:0e7e54a3da10 | 59680:1d33b3da1157 |
---|---|
3177 (if (eq buffer-invisibility-spec t) | 3177 (if (eq buffer-invisibility-spec t) |
3178 prop | 3178 prop |
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) |
3189 (opoint (point)) | 3210 (opoint (point)) |
3190 (forward (> arg 0))) | 3211 (forward (> arg 0))) |