3.5.4 Backing-up files on saving

When a file is explicitly saved in the editor, a backup is automatically made by writing the old contents of the file to a backup before saving the new version of the file. The backup file appears in the same directory as the original file, its name being the same as that file followed by a ~ character.


Editor Variable

Default value: t

If the value of this variable is t , backups are automatically made on file saving. If its value is nil , no backups are made.


Editor Variable

Default value: #\~

This variable contains the character used as a suffix for backup files. By default, this is the tilde (~) character.


Editor Variable

Default value: "~A~A~A"

This control string is used with the Common Lisp format function to create the filename of the backup file. format is called with three arguments, the first being the directory name-string and the second being the file name-string of the pathname associated with the buffer. The third is the value of the editor variable backup-filename-suffix .

The backup file is created in the same directory as the file for which it is a backup, and it has the same name, followed by the backup-filename-suffix .

Note that the backup-suffix can be changed functionally as well as by interactive means. For example, the following code changes the suffix to the @ character:

(setf (editor:variable-value "Backup Filename Suffix"
         :current nil) #\@)

LispWorks Editor User Guide (Windows version) - 23 Feb 2006