X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/678fb7066698ebfe3aecba722294025ed26da01b..29b83cecea5cbb09a715282824feb568f03cdf54:/src/filelock.c diff --git a/src/filelock.c b/src/filelock.c index 2613eec4ac..d8914c7332 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -550,6 +550,10 @@ lock_file (Lisp_Object fn) struct gcpro gcpro1; USE_SAFE_ALLOCA; + /* Don't do locking if the user has opted out. */ + if (! create_lockfiles) + return; + /* Don't do locking while dumping Emacs. Uncompressing wtmp files uses call-process, which does not work in an uninitialized Emacs. */ @@ -722,6 +726,10 @@ syms_of_filelock (void) doc: /* The directory for writing temporary files. */); Vtemporary_file_directory = Qnil; + 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);