Function: follow-update-window-start

follow-update-window-start is a byte-compiled function defined in follow.el.gz.

Signature

(follow-update-window-start WIN)

Documentation

Make sure that the start of WIN starts at a full screen line.

Source Code

;; Defined in /usr/src/emacs/lisp/follow.el.gz
;; Make sure WIN always starts at the beginning of a whole screen
;; line. If WIN is not aligned the start is updated which probably
;; will lead to a redisplay of the screen later on.
;;
;; This is used with the first window in a follow chain.  The reason
;; is that we want to detect that point is outside the window.
;; (Without the update, the start of the window will move as the
;; user presses BackSpace, and the other window redisplay routines
;; will move the start of the window in the wrong direction.)

(defun follow-update-window-start (win)
  "Make sure that the start of WIN starts at a full screen line."
  (save-excursion
    (goto-char (window-start win))
    (unless (bolp)
      (vertical-motion 0 win)
      (unless (eq (point) (window-start win))
	(vertical-motion 1 win)
	(set-window-start win (point) 'noforce)))))