Function: window-screen-lines
window-screen-lines is a byte-compiled function defined in
simple.el.gz.
Signature
(window-screen-lines)
Documentation
Return the number of screen lines in the text area of the selected window.
This is different from window-text-height in that this function counts
lines in units of the height of the font used by the default face displayed
in the window, not in units of the frame's default font, and also accounts
for line-spacing, if any, defined for the window's buffer or frame.
The value is a floating-point number.
Source Code
;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun window-screen-lines ()
"Return the number of screen lines in the text area of the selected window.
This is different from `window-text-height' in that this function counts
lines in units of the height of the font used by the default face displayed
in the window, not in units of the frame's default font, and also accounts
for `line-spacing', if any, defined for the window's buffer or frame.
The value is a floating-point number."
(let ((edges (window-inside-pixel-edges))
(dlh (default-line-height)))
(/ (float (- (nth 3 edges) (nth 1 edges))) dlh)))