目前它以格式保存文件:
.#main.c -> sara@sara.home.com.27017:1231918415
这使它成为问题,因为它以".c"结尾.
我需要它.#main.c#
更新:我有emacs 22.1
那不是自动恢复文件,这是用作文件锁定标记的链接.
如果我告诉你,你会把我介绍给Summer Glau吗?
改变这一点可能并不容易; 我只是挖了一下它看起来像是在C代码中设置的.但是让我们问下一个问题:你为什么这么想?我猜你正在为.c
那些你不想与之匹配的文件打一个正则表达式.如果是这样,请注意所有这些lockfile链接.#
始终是 - 硬编码 - 这样您总是可以排除名称与"^.#"匹配的文件(取决于您使用的是哪种正则表达式语法).
如果你真的想破解它,那就是在filelock.c中的EMACS 22的第320行.这是代码:
/* 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++); } }