# quick-exit(2)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

quick-exit - Exit the editor writing changes
save-buffers-exit-emacs - Exit the editor prompt user to write changes

## SYNOPSIS

n quick-exit (esc z) [exitCode]
save-buffers-exit-emacs (C-x C-c) [exitCode]

## DESCRIPTION

quick-exit writes out all changed buffers to the files they were read from, saves all changed dictionaries, killing any running commands and exits the editor.

The numeric argument is defined as follows:

`0`

A zero numeric argument then the editor is closed down and any unsaved buffers are lost.

`1`

Prompting the user before saving any files, writes out all changed buffers to the files they were read from. Saves all changed dictionaries, killing any running commands and exits the editor.

`2`

Discard changed buffers (except the history and registry) and delete any backup files associated with the edited buffer(s). Only valid with quick-exit.

save-buffers-exit-emacs prompts the user before saving any files, writes out all changed buffers to the files they were read from. Saves all changed dictionaries, killing any running commands and exits the editor.

## MACRO INTERACTION

If the macro shut-down(3) is defined then it is invoked by the editor when it is closed. A user defined shutdown action may be associated with the close operation. It is the callers responsibility that the macro terminates correctly otherwise the editor will hang.

For macros development then the exit-emacs(2) command provides better control of the exit process than quick-exit and save-buffers-exit-emacs and should be used instead. save-buffers-exit-emacs is actually implemented as 3 exit-emacs.

## NOTES

All buffers with a name starting with a '*' are assumed to be system buffer (i.e. *scratch*) and are not saved.

## SEE ALSO

exit-emacs(2), save-buffer(2), shut-down(3).

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>