Emacs normally tries to redisplay the screen whenever it waits for input. With the following function, you can request an immediate attempt to redisplay, in the middle of Lisp code, without actually waiting for input.
This function tries immediately to redisplay. The optional argument force, if non-
nil, forces the redisplay to be performed, instead of being preempted, even if input is pending and the variable
nil(see below). If
nil(the default), this function redisplays in any case, i.e., force does nothing.
The function returns
tif it actually tried to redisplay, and
nilotherwise. A value of
tdoes not mean that redisplay proceeded to completion; it could have been preempted by newly arriving input.
If this variable is
nil, arriving input events preempt redisplay; Emacs avoids starting a redisplay, and stops any redisplay that is in progress, until the input has been processed. In particular,
nilwithout actually redisplaying, if there is pending input.
The default value is
t, which means that pending input does not preempt redisplay.
nil, this variable specifies how many seconds Emacs waits between checks for new input during redisplay; if input arrives during this interval, redisplay stops and the input is processed. The default value is 0.1; if the value is
nil, Emacs does not check for input during redisplay.
This variable has no effect when
redisplay tries immediately to redisplay, it does
not change how Emacs decides which parts of its frame(s) to redisplay.
By contrast, the following function adds certain windows to the
pending redisplay work (as if their contents had completely changed),
but does not immediately try to perform redisplay.
This function forces some or all windows to be updated the next time Emacs does a redisplay. If object is a window, that window is to be updated. If object is a buffer or buffer name, all windows displaying that buffer are to be updated. If object is
nil(or omitted), all windows are to be updated.
This function does not do a redisplay immediately; Emacs does that as it waits for input, or when the function