Checks that the buffer returned from get-edit has been saved.
reason is used in the warning dialog to the users before saving.