diff options
| author | Dave Abrahams | 2012-05-09 20:55:57 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-05-09 20:55:57 -0400 |
| commit | 836d29b3704d0dc40411715fc0a9f3a708a8f8ad (patch) | |
| tree | 5b4b10d69efb6f4a78399932961a7213dc80d4a0 /src | |
| parent | db5a3003037a018f47151bb6daaf249d422be2ba (diff) | |
| download | emacs-836d29b3704d0dc40411715fc0a9f3a708a8f8ad.tar.gz emacs-836d29b3704d0dc40411715fc0a9f3a708a8f8ad.zip | |
Add the option to not create lockfiles
* src/filelock.c (syms_of_filelock): New boolean create-lockfiles.
(lock_file): If create_lockfiles is 0, do nothing.
* lisp/cus-start.el (create-lockfiles): Add it.
Fixes: debbugs:11227
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/filelock.c | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 07d85cbf5c8..d4e38f5271c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-05-10 Dave Abrahams <dave@boostpro.com> | ||
| 2 | |||
| 3 | * filelock.c (syms_of_filelock): New boolean create-lockfiles. | ||
| 4 | (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227) | ||
| 5 | |||
| 1 | 2012-05-09 Michael Albinus <michael.albinus@gmx.de> | 6 | 2012-05-09 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 7 | ||
| 3 | * dbusbind.c (xd_registered_buses): New internal Lisp object. | 8 | * dbusbind.c (xd_registered_buses): New internal Lisp object. |
diff --git a/src/filelock.c b/src/filelock.c index 2613eec4aca..d8914c73328 100644 --- a/src/filelock.c +++ b/src/filelock.c | |||
| @@ -550,6 +550,10 @@ lock_file (Lisp_Object fn) | |||
| 550 | struct gcpro gcpro1; | 550 | struct gcpro gcpro1; |
| 551 | USE_SAFE_ALLOCA; | 551 | USE_SAFE_ALLOCA; |
| 552 | 552 | ||
| 553 | /* Don't do locking if the user has opted out. */ | ||
| 554 | if (! create_lockfiles) | ||
| 555 | return; | ||
| 556 | |||
| 553 | /* Don't do locking while dumping Emacs. | 557 | /* Don't do locking while dumping Emacs. |
| 554 | Uncompressing wtmp files uses call-process, which does not work | 558 | Uncompressing wtmp files uses call-process, which does not work |
| 555 | in an uninitialized Emacs. */ | 559 | in an uninitialized Emacs. */ |
| @@ -722,6 +726,10 @@ syms_of_filelock (void) | |||
| 722 | doc: /* The directory for writing temporary files. */); | 726 | doc: /* The directory for writing temporary files. */); |
| 723 | Vtemporary_file_directory = Qnil; | 727 | Vtemporary_file_directory = Qnil; |
| 724 | 728 | ||
| 729 | DEFVAR_BOOL ("create-lockfiles", create_lockfiles, | ||
| 730 | doc: /* Non-nil means use lockfiles to avoid editing collisions. */); | ||
| 731 | create_lockfiles = 1; | ||
| 732 | |||
| 725 | #ifdef CLASH_DETECTION | 733 | #ifdef CLASH_DETECTION |
| 726 | defsubr (&Sunlock_buffer); | 734 | defsubr (&Sunlock_buffer); |
| 727 | defsubr (&Slock_buffer); | 735 | defsubr (&Slock_buffer); |