PRESERVE…RESTORE

PRESERVE.
...
RESTORE.

PRESERVE saves all of the settings that SET can adjust. A later RESTORE command restores those settings.

PRESERVE can be nested up to five levels deep.