Why does Emacs overwrite the same file using different filenames?
Older versions of Windows 95 had a bug where different filenames with a particular structure would wind up with the same short filename, and hence the different filenames would point to the same file on disk. For example, “foo.mak” and “foo.mak~” will map to the same file. Early versions of Emacs suffered from this bug, but later versions (19.34.1 and above at least) work around it. However, disabling the registry entry HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem\NameNumericTail in Windows 95/98 (by setting it to 0) will still cause these filename conflicts. According to Microsoft, this entry should never be set to 0 for Windows 95 and 98 (see MS KnowledgeBase articles Q148594 and Q179370), but if you must have it set to 0 then you should change how backup files are created.