Function: window-width

window-width is a for window-body-width, defined in window.c.

Signature

(window-width &optional WINDOW PIXELWISE)

Documentation

Return the width of WINDOW's text area.

WINDOW must be a live window and defaults to the selected one. Optional argument PIXELWISE non-nil means return the width in pixels. The return value does not include any vertical dividers, fringes or marginal areas, or scroll bars.

If PIXELWISE is nil, return the largest integer smaller than WINDOW's pixel width divided by the character width of WINDOW's frame. This means that if a column at the right of the text area is only partially visible, that column is not counted.

Note that the returned value includes the column reserved for the continuation glyph.

Probably introduced at or before Emacs version 24.1.

Aliases

window-width