Next: Input to the inferior, Previous: subbuffer, Up: Overview
When a "graphical" program finishes, it is nice to
restore the screen state to what it was before the program started.
Many people are used to this behavior from xterm, and
its also offered by the term emulator.
If set is true, and we’re not already using the alternate sub-buffer,
switch to it. What this means is that the term-home-marker
is saved (in the variable term-saved-home-marker), and the
term-home-marker is set to the end of the buffer.
If set is false and we’re using the alternate sub-buffer,
switch back to the saved sub-buffer. What this means is that the
(current, alternate) sub-buffer is deleted (using
(delete-region term-home-marker (point-max))), and then the
term-home-marker is restored (from term-saved-home-marker).