]> git.eshelyaron.com Git - emacs.git/commit
Further cleanup for file locks
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 9 Jul 2021 16:14:19 +0000 (18:14 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 9 Jul 2021 16:14:19 +0000 (18:14 +0200)
commit9ce6541ac9710933beca7f9944087fe4849d5ae9
tree133344956b38933f504071bfa114fc712296f43c
parent2870a72d0d6675e189457394ac421bd8e5ab4561
Further cleanup for file locks

* doc/misc/tramp.texi (Top, Configuration): Adapt node name for
file locks.
(Auto-save File Lock and Backup): Rename node name and section
title.  Add file-lock to @cindex.  Describe file locks.

* lisp/dired.el (dired-trivial-filenames): Add lock files.
(dired-font-lock-keywords): Move files suffixed with
`completion-ignored-extensions' up.  Add lock files to these checks.

* lisp/net/tramp.el (tramp-get-lock-file, tramp-handle-unlock-file):
Use `when-let'
(tramp-lock-file-info-regexp): Rename from
`tramp-lock-file-contents-regexp'.
(tramp-handle-file-locked-p, tramp-handle-lock-file): Adapt callees.
(tramp-handle-lock-file): Set file modes of lockname.

* src/buffer.c (Frestore_buffer_modified_p):
* src/fileio.c (write_region):
* src/insdel.c (prepare_to_modify_buffer_1): Call Flock_file.

* src/filelock.c (Qmake_lock_file_name): Declare symbol.
(make_lock_file_name): Use it.  Don't check Fboundp, it doesn't
work for interned symbols.
(lock_file): Return a Lisp_Object.  Don't check create_lockfiles.
Remove MSDOS version of the function.
(Flock_file): Check create_lockfiles.
(Flock_buffer): Call Flock_file.

* src/lisp.h (lock_file): Remove.

* test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo)
(shadow-test09-shadow-copy-files): Let-bind `create-lockfiles'.

* test/lisp/net/tramp-tests.el (create-lockfiles): Don't set it
globally.
(tramp-test39-lock-file): Check also for `set-visited-file-name'.
doc/misc/tramp.texi
lisp/dired.el
lisp/net/tramp.el
src/buffer.c
src/fileio.c
src/filelock.c
src/insdel.c
src/lisp.h
test/lisp/net/tramp-tests.el
test/lisp/shadowfile-tests.el