aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorEli Zaretskii2013-02-25 19:36:03 +0200
committerEli Zaretskii2013-02-25 19:36:03 +0200
commit343a2aefb528ce3c978ba2145705b9e37bfbe02a (patch)
tree4672030eea98dfc9bd077ac58400271d1c812918 /etc
parentaec32f66d0db82b562e904dfe7bb6d54796fe773 (diff)
downloademacs-343a2aefb528ce3c978ba2145705b9e37bfbe02a.tar.gz
emacs-343a2aefb528ce3c978ba2145705b9e37bfbe02a.zip
Implement CLASH_DETECTION for MS-Windows.
src/filelock.c [WINDOWSNT]: Include w32.h. (MAKE_LOCK_NAME): Don't use 'lock', it clashes with MS runtime function of that name. Up-case the macro arguments. (IS_LOCK_FILE): New macro. (fill_in_lock_file_name): Use IS_LOCK_FILE instead of S_ISLNK. (create_lock_file): New function, with body extracted from lock_file_1. [WINDOWSNT]: Implement lock files by writing a regular file with the lock information as its contents. (read_lock_data): New function, on Posix platforms just calls emacs_readlinkat. [WINDOWSNT]: Read the lock info from the file. (current_lock_owner): Call read_lock_data instead of calling emacs_readlinkat directly. (lock_file) [WINDOWSNT]: Run the file name through dostounix_filename. src/w32proc.c (sys_kill): Support the case of SIG = 0, in which case just check if the process by that PID exists. src/w32.c (sys_open): Don't reset the _O_CREAT flag if _O_EXCL is also present, as doing so will fail to error out if the file already exists. src/makefile.w32-in ($(BLD)/filelock.$(O)): Depend on src/w32.h. nt/inc/ms-w32.h (BOOT_TIME_FILE): Define. nt/config.nt (CLASH_DETECTION): Define to 1. lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Reject files that match "\`\.#", to avoid compiling lock files, even if they are readable (as they are on MS-Windows). doc/emacs/files.texi (Interlocking): Don't refer to symlinks as the exclusive means of locking files. etc/NEWS: Mention support for lock files on MS-Windows.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS7
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 07f52adb2b1..7d1110d5dc6 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -348,6 +348,13 @@ Setting it has no effect, and %t in the mode-line format is ignored.
348Likewise, `file-name-buffer-file-type-alist' is now obsolete, and 348Likewise, `file-name-buffer-file-type-alist' is now obsolete, and
349modifying it has no effect. 349modifying it has no effect.
350 350
351---
352** Lock files now work on MS-Windows.
353This allows to avoid losing your edits if the same file is being
354edited in another Emacs session or by another user. See the node
355"Interlocking" in the Emacs User Manual for the details. To disable
356file locking, customize `create-lockfiles' to nil.
357
351** Improved fullscreen support on Mac OS X. 358** Improved fullscreen support on Mac OS X.
352Both native (>= OSX 10.7) and "old style" fullscreen are supported. 359Both native (>= OSX 10.7) and "old style" fullscreen are supported.
353Customize `ns-use-native-fullscreen' to change style. For >= 10.7 360Customize `ns-use-native-fullscreen' to change style. For >= 10.7