XEmacs always creates a file named foo.txt~ when you edit foo.txt. This can be really useful but not really when you are using source control on your files.
I know you can use (setq make-backup-files nil) to turn it off altogether but was wondering if there was a way to turn it off only in particular directories.
The version control package will detect if you're in a CVS, RCS, or SCCS repository and disable backups. If you're using another VC backend like hg, git, or svn, you may need to install additional packages to enable emacs to detect their repositories.