Question: At the moment it saves the file with format:

```
.#main.c -> sara@sara.home.com.27017:1231918415

```

This makes it problematic since it ends with ".c".

I need it to be .#main.c#

Update: I have emacs 22.1

Answer: 
That's not the auto-recovery file, that's the link used as a locking token for the file.

### update

If I tell you, will you introduce me to Summer Glau?

It's probably not going to be easy to change that; I just dug a bit and it looks like it's set in the C code. But let's ask the next question: why do you want to? I'm guessing you're hitting a regular expression for `.c` files that you don't want to match these. If so, note that all these lockfile links start with `.#` -- invariably, that's hardcoded -- so you could always exclude files with names that match "^.#" (depending on which regex syntax you use.)

If you really want to hack at it, it's in filelock.c at about line 320 in EMACS 22. Here's the code:

```
/* Write the name of the lock file for FN into LFNAME.  Length will be
   that of FN plus two more for the leading `.#' plus 1 for the
   trailing period plus one for the digit after it plus one for the
   null.  */
#define MAKE_LOCK_NAME(lock, file) \
  (lock = (char *) alloca (SBYTES (file) + 2 + 1 + 1 + 1), \
   fill_in_lock_file_name (lock, (file)))

static void
fill_in_lock_file_name (lockfile, fn)
     register char *lockfile;
     register Lisp_Object fn;
{
  register char *p;
  struct stat st;
  int count = 0;

  strcpy (lockfile, SDATA (fn));

  /* Shift the nondirectory part of the file name (including the null)
     right two characters.  Here is one of the places where we'd have to
     do something to support 14-character-max file names.  */
  for (p = lockfile + strlen (lockfile); p != lockfile && *p != '/'; p--)
    p[2] = *p;

  /* Insert the `.#'.  */
  p[1] = '.';
  p[2] = '#';

  p = p + strlen (p);

  while (lstat (lockfile, &st) == 0 && !S_ISLNK (st.st_mode))
    {
      if (count > 9)
    {
      *p = '\0';
      return;
    }
      sprintf (p, ".%d", count++);
    }
}

```
That's strange, the default should have # at each end..

You can customize the name by redefining the auto-save-file-name-p and make-auto-save-file-name functions. In GNU emacs you would add the elisp to your .emacs file.