Variable: window-state-change-functions

window-state-change-functions is a variable defined in window.c.

Value

nil

Documentation

Functions called during redisplay when the window state changed.

The value should be a list of functions that take one argument.

Functions specified buffer-locally are called for each window showing the corresponding buffer if and only if that window has been added, resized, changed its buffer or has been (de-)selected since the last redisplay. In this case the window is passed as argument and the respective buffer is temporarily made current.

Functions specified by the default value are called for each frame if at least one window on that frame has been added, deleted, changed its buffer or its total or body size or the frame has been (de-)selected, its selected window has changed or the window state change flag has been set for this frame since the last redisplay. In this case the frame is passed as argument.

View in manual

Probably introduced at or before Emacs version 27.1.

Source Code

// Defined in /usr/src/emacs/src/window.c
  DEFVAR_LISP ("window-state-change-functions", Vwindow_state_change_functions,
	       doc: /* Functions called during redisplay when the window state changed.
The value should be a list of functions that take one argument.

Functions specified buffer-locally are called for each window showing
the corresponding buffer if and only if that window has been added,
resized, changed its buffer or has been (de-)selected since the last
redisplay.  In this case the window is passed as argument and the
respective buffer is temporarily made current.

Functions specified by the default value are called for each frame if
at least one window on that frame has been added, deleted, changed its
buffer or its total or body size or the frame has been (de-)selected,
its selected window has changed or the window state change flag has
been set for this frame since the last redisplay.  In this case the
frame is passed as argument.  */);