Function: window-body-width

window-body-width is a function defined in window.c.

Signature

(window-body-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. The return value does not include any vertical dividers, fringes or marginal areas, or scroll bars.

The optional argument PIXELWISE defines the units to use for the width. If nil, return the largest integer smaller than WINDOW's pixel width in units of the character width of WINDOW's frame. If PIXELWISE is remap and the default face is remapped (see face-remapping-alist), use the remapped face to determine the character width. For any other non-nil value, return the width in pixels.

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

Also see window-max-chars-per-line.

View in manual

Probably introduced at or before Emacs version 24.1.

Aliases

window-width

Source Code

// Defined in /usr/src/emacs/src/window.c
{
  return (make_fixnum
	  (window_body_width (decode_live_window (window),
			      window_body_unit_from_symbol (pixelwise))));
}