Next: , Up: Backing Up Files   [Index]


7.3.4.1 make-backup-files—a variable

Emacs can be configured to make backup files on save in several different ways, using the variable make-backup-files, which by default is t.

make-backup-files
  • non-nil means make a backup of a file the first time it is saved. This can be done:
    • by renaming the file; the existing file is renamed so that it is a backup file; the buffer is then written into a new file with the original file name.
    • by copying the file; the existing file is copied into a backup file; then the buffer is written into the file, overwriting it with new content.
    • the choice of renaming or copying is controlled by the variables:
      backup-by-copying

      non-nil means using copying

      backup-by-copying-when-linked

      non-nil means using copying for files with multiple names. The alternate names will refer to the latest version as edited. backup-by-copying must be nil.

      backup-by-copying-when-mismatch

      Non-nil means create backups by copying if this preserves owner or group.

      backup-by-copying-when-priviledged-mismatch

      Non-nil means create backups by copying to preserve a privileged owner.

      backup-inhibited

      If non-nil, backups will be inhibited.