]> git.eshelyaron.com Git - emacs.git/commit
Add new user option lock-file-name-transforms
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 7 Jul 2021 19:39:00 +0000 (21:39 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 7 Jul 2021 19:39:20 +0000 (21:39 +0200)
commit2ad34bcea4ed686e56078e91d63417480e5642b4
treeb10a2e2a4f539dbfdfe7b005890e570a46c0cc4e
parent6d594848e052b1e627479ee1068e147a6aaf1c70
Add new user option lock-file-name-transforms

* doc/emacs/files.texi (Interlocking): Mention
lock-file-name-transforms.

* doc/lispref/files.texi (File Locks): Document
lock-file-name-transforms.

* doc/misc/efaq.texi (Not writing files to the current directory):
Mention all the three variables needed to not having Emacs writing
files to the current directory in one place.

* lisp/files.el (lock-file-name-transforms): New user option (bug#49261).
(make-auto-save-file-name): Factor out the main logic...
(auto-save--transform-file-name): ... to this new function.
(make-lock-file-name): New function that also calls the
factored-out function.

* src/filelock.c: Remove MAKE_LOCK_NAME and fill_in_lock_file_name.
(make_lock_file_name): New utility function that calls out to Lisp
to heed `lock-file-name-transforms'.
(lock_file): Use it.  Also remove likely buggy call to
dostounix_filename.
(unlock_file_body, Ffile_locked_p): Also use make_lock_file_name.
doc/emacs/files.texi
doc/lispref/files.texi
doc/misc/efaq.texi
etc/NEWS
lisp/files.el
src/filelock.c
test/lisp/files-tests.el