plist module
[bpt/emacs.git] / src / filelock.c
index 5252db0..3a26814 100644 (file)
@@ -55,8 +55,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "w32.h"       /* for dostounix_filename */
 #endif
 
-#ifdef CLASH_DETECTION
-
 #ifdef HAVE_UTMP_H
 #include <utmp.h>
 #endif
@@ -773,7 +771,9 @@ DEFUN ("lock-buffer", Flock_buffer, Slock_buffer,
        0, 1, 0,
        doc: /* Lock FILE, if current buffer is modified.
 FILE defaults to current buffer's visited file,
-or else nothing is done if current buffer isn't visiting a file.  */)
+or else nothing is done if current buffer isn't visiting a file.
+
+If the option `create-lockfiles' is nil, this does nothing.  */)
   (Lisp_Object file)
 {
   if (NILP (file))
@@ -837,11 +837,11 @@ t if it is locked by you, else a string saying which user has locked it.  */)
   return ret;
 }
 
-#endif /* CLASH_DETECTION */
-
 void
 syms_of_filelock (void)
 {
+#include "filelock.x"
+
   DEFVAR_LISP ("temporary-file-directory", Vtemporary_file_directory,
               doc: /* The directory for writing temporary files.  */);
   Vtemporary_file_directory = Qnil;
@@ -849,10 +849,4 @@ syms_of_filelock (void)
   DEFVAR_BOOL ("create-lockfiles", create_lockfiles,
               doc: /* Non-nil means use lockfiles to avoid editing collisions.  */);
   create_lockfiles = 1;
-
-#ifdef CLASH_DETECTION
-  defsubr (&Sunlock_buffer);
-  defsubr (&Slock_buffer);
-  defsubr (&Sfile_locked_p);
-#endif
 }