Another way of configuring backup options is via the Customize interface. Enter:
M-x customize-group
And then at the Customize group:
prompt enter backup
.
If you scroll to the bottom of the buffer you'll see Backup Directory Alist. Click Show Value and set the first entry of the list as follows:
Regexp matching filename: .*
Backup directory name: /path/to/your/backup/dir
Alternatively, you can turn backups off my setting Make Backup Files to off
.
If you don't want Emacs to automatically edit your .emacs
file you'll want to set up a customisations file.