Function: pixel-point-at-unseen-line

pixel-point-at-unseen-line is a byte-compiled function defined in pixel-scroll.el.gz.

Signature

(pixel-point-at-unseen-line)

Documentation

Return the character position of line above the selected window.

The returned value is the position of the first character on the unseen line just above the scope of current window.

Source Code

;; Defined in /usr/src/emacs/lisp/pixel-scroll.el.gz
(defun pixel-point-at-unseen-line ()
  "Return the character position of line above the selected window.
The returned value is the position of the first character on the
unseen line just above the scope of current window."
  (let* ((pos0 (window-start))
         (vscroll0 (window-vscroll nil t))
         (pos
          (save-excursion
            (goto-char pos0)
            (if (bobp)
                (point-min)
              ;; When there's an overlay string at window-start,
              ;; (beginning-of-visual-line 0) stays put.
              (let ((ppos (point))
                    (tem (beginning-of-visual-line 0)))
                (if (eq tem ppos)
                    (vertical-motion -1))
                (point))))))
    ;; restore initial position
    (set-window-start nil pos0 t)
    (set-window-vscroll nil vscroll0 t)
    pos))