Save the code fold state when a document is closed and restore the folding state the next time the file is opened.