Function: set-window-new-total

set-window-new-total is a function defined in window.c.

Signature

(set-window-new-total WINDOW SIZE &optional ADD)

Documentation

Set new total size of WINDOW to SIZE.

WINDOW must be a valid window and defaults to the selected one. Return SIZE.

Optional argument ADD non-nil means add SIZE to the new total size of WINDOW and return the sum.

The new total size of WINDOW, if valid, will be shortly installed as WINDOW's total height (see window-total-height) or total width (see window-total-width).

Note: This function does not operate on any child windows of WINDOW.

Source Code

// Defined in /usr/src/emacs/src/window.c
{
  struct window *w = decode_valid_window (window);

  CHECK_FIXNUM (size);
  if (NILP (add))
    wset_new_total (w, size);
  else
    wset_new_total (w, make_fixnum (XFIXNUM (w->new_total) + XFIXNUM (size)));

  return w->new_total;
}