allow-close-with-no-filename? in editor:file<%>

This method indicates if closing the file when it hasn't been saved is a reason to alert the user. See also can-close?.