]> git.eshelyaron.com Git - emacs.git/commit
File unlock errors now issue warnings (Bug#46397)
authorMatt Armstrong <matt@rfc20.org>
Fri, 19 Feb 2021 23:39:15 +0000 (15:39 -0800)
committerEli Zaretskii <eliz@gnu.org>
Sat, 27 Mar 2021 09:17:31 +0000 (12:17 +0300)
commitc4ab173df3ea4c37165c011c515928da1783a9ae
tree904f450d63ff41d30ef07fa5a8adbea0d747a703
parenta443a379c54158f49efd8542632c4e9478aa1117
File unlock errors now issue warnings (Bug#46397)

The primary idea is to allow `kill-buffer' and `kill-emacs' to
complete even if Emacs has trouble unlocking the buffer's file.

* lisp/userlock.el (userlock--handle-unlock-error): New function, call
`display-error'.
* src/filelock.c (unlock_file_body): New function, do what
'unlock_file' used to.
(unlock_file_handle_error): New function, call
`userlock--handle-unlock-error' with the captured error.
(unlock_file): Handle `file-error' conditions by calling the handler
defined above.
* test/src/filelock-tests.el (filelock-tests-kill-buffer-spoiled):
(filelock-tests-unlock-spoiled): Modify to test new behavior.
doc/lispref/files.texi
etc/NEWS
lisp/userlock.el
src/filelock.c
test/src/filelock-tests.el