exit_editor
exit_editor ([rc[, code]])
This function terminates the application with rc, which is a return code you assigned, or 0 if not supplied, as the exit program code. The argument code determines if the user is prompted for unsaved changes or not and has one of the values:
• 0 — prompt about any unsaved changes, that is, quit
• 1 — save all modified documents without prompting, that is, exit
• 2 — do not prompt about unsaved changes and quit without saving modified documents, that is, quit ok
The default is 0.