Function: edt-top-check
edt-top-check is a byte-compiled function defined in edt.el.gz.
Signature
(edt-top-check BEG LINES)
Documentation
Enforce scroll margin at the top of screen.
Argument BEG is the starting line number before cursor was moved. Argument LINES is the number of lines the cursor moved toward the top.
Source Code
;; Defined in /usr/src/emacs/lisp/emulation/edt.el.gz
;;;
;;; Scroll Margins
;;;
(defun edt-top-check (beg lines)
"Enforce scroll margin at the top of screen.
Argument BEG is the starting line number before cursor was moved.
Argument LINES is the number of lines the cursor moved toward the top."
(let ((margin (/ (* (window-height) edt-top-scroll-margin) 100)))
(cond ((< beg margin) (recenter beg))
((< (- beg lines) margin) (recenter margin)))))