make-backup-file-name-function

make-backup-file-name-function is a variable defined in `files.el'.
Its value is
make-backup-file-name--default-function

  • This variable may be risky if used as a file-local variable.

Documentation:
A function that `make-backup-file-name' uses to create backup file names.
The function receives a single argument, the original file name.

If you change this, you may need to change `backup-file-name-p' and
`file-name-sans-versions' too.

You could make this buffer-local to do something special for specific files.

For historical reasons, a value of nil means to use the default function.
This should not be relied upon.

See also `backup-directory-alist'.

You can customize this variable.

This variable was introduced, or its default value was changed, in version 24.4 of Emacs.