Function: strokes-event-closest-point-1
strokes-event-closest-point-1 is a byte-compiled function defined in
strokes.el.gz.
Signature
(strokes-event-closest-point-1 WINDOW &optional LINE)
Documentation
Return position of start of line LINE in WINDOW.
If LINE is nil, return the last position visible in WINDOW.
Source Code
;; Defined in /usr/src/emacs/lisp/strokes.el.gz
(defun strokes-event-closest-point-1 (window &optional line)
"Return position of start of line LINE in WINDOW.
If LINE is nil, return the last position visible in WINDOW."
(let* ((total (- (window-height window)
(if (window-minibuffer-p window)
0 1)))
(distance (or line total)))
(save-excursion
(goto-char (window-start window))
(if (= (vertical-motion distance) distance)
(if (not line)
(forward-char -1)))
(point))))