aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Abrahams2012-05-09 20:55:57 -0400
committerGlenn Morris2012-05-09 20:55:57 -0400
commit836d29b3704d0dc40411715fc0a9f3a708a8f8ad (patch)
tree5b4b10d69efb6f4a78399932961a7213dc80d4a0
parentdb5a3003037a018f47151bb6daaf249d422be2ba (diff)
downloademacs-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
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/cus-start.el1
-rw-r--r--src/ChangeLog5
-rw-r--r--src/filelock.c8
4 files changed, 18 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bf15cd2f9aa..f1429f9f875 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12012-05-10 Dave Abrahams <dave@boostpro.com>
2
3 * cus-start.el (create-lockfiles): Add it.
4
12012-05-09 Chong Yidong <cyd@gnu.org> 52012-05-09 Chong Yidong <cyd@gnu.org>
2 6
3 * net/browse-url.el (browse-url-url-encode-chars): Use upper-case. 7 * net/browse-url.el (browse-url-url-encode-chars): Use upper-case.
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 3863e718f58..fc3c6561a1e 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -204,6 +204,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
204 (delete-by-moving-to-trash auto-save boolean "23.1") 204 (delete-by-moving-to-trash auto-save boolean "23.1")
205 (auto-save-visited-file-name auto-save boolean) 205 (auto-save-visited-file-name auto-save boolean)
206 ;; filelock.c 206 ;; filelock.c
207 (create-lockfiles files boolean "24.2")
207 (temporary-file-directory 208 (temporary-file-directory
208 ;; Darwin section added 24.1, does not seem worth :version bump. 209 ;; Darwin section added 24.1, does not seem worth :version bump.
209 files directory nil 210 files directory nil
diff --git a/src/ChangeLog b/src/ChangeLog
index 07d85cbf5c8..d4e38f5271c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12012-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
12012-05-09 Michael Albinus <michael.albinus@gmx.de> 62012-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);