save-buffer saves the contents of the current buffer if the contents have been changed, writing the buffer back to the file it was read from.
On saving the file, if
time(2m) mode is enabled then the
time stamp string is searched for in the file and modified if located, to reflect the modification date and time.
backup(2m) mode is enabled then a backup copy of the file existing is created and the contents of the buffer are written to the file. Any
automatic save copies of the file are deleted.
If the buffer contains a
narrow(2m) it will automatically be removed before saving so that the whole buffer is saved and restored when saving is complete
auto(2m) mode is enabled the the file is written out in the style indicated by modes
ctrlz(2m). Otherwise the file is written out in the style on the current platform.
The argument n can be used to change the default behavior of save-buffer described above, n is a bit based flag where:-
Enables validity checks (default). These include check that the buffer has been modified, if not an error occurs. Also the time stamp of the file to be written is checked, if the file systems file exists and is newer the confirmation of writing is requested from the user. If this flag is not supplied then the buffer is written whenever possible and without any prompts to the user.
Disables the expansion of any narrows (see
narrow-buffer(2)) before saving the buffer. That is, the buffer is saved as it appears on the screen and the content of any narrow regions is discarded.
undo(2) information is discarded when the file is saved.
- Refer to
$auto-time(5) for a description of the file extensions used by MicroEmacs '06 for backup and temporary files.
- Buffers may also be saved via the
Copyright (c) 1998-2006 JASSPA
Last Modified: 2004/01/11
Generated On: 2006/10/07