This function makes a backup of the file visited by the current buffer, if appropriate. It is called by
save-bufferbefore saving the buffer the first time.
This buffer-local variable indicates whether this buffer's file has been backed up on account of this buffer. If it is non-
nil, then the backup file has been written. Otherwise, the file should be backed up when it is next saved (if backups are enabled). This is a permanent local;kill-local-variablesdoes not alter it.
This variable determines whether or not to make backup files. If it is non-
nil, then SXEmacs creates a backup of each file when it is saved for the first time—provided thatbackup-inhibitedisnil(see below).The following example shows how to change the
make-backup-filesvariable only in the RMAIL buffer and not elsewhere. Setting itnilstops SXEmacs from making backups of the RMAIL file, which may save disk space. (You would put this code in your .emacs file.)(add-hook 'rmail-mode-hook (function (lambda () (make-local-variable 'make-backup-files) (setq make-backup-files nil))))
This variable's value is a function to be called on certain occasions to decide whether a file should have backup files. The function receives one argument, a file name to consider. If the function returns
nil, backups are disabled for that file. Otherwise, the other variables in this section say whether and how to make backups.The default value is this:
(lambda (name) (or (< (length name) 5) (not (string-equal "/tmp/" (substring name 0 5)))))
If this variable is non-
nil, backups are inhibited. It records the result of testingbackup-enable-predicateon the visited file name. It can also coherently be used by other mechanisms that inhibit backups based on which file is visited. For example, VC sets this variable non-nilto prevent making backups for files managed with a version control system.This is a permanent local, so that changing the major mode does not lose its value. Major modes should not set this variable—they should set
make-backup-filesinstead.