Eli Zaretskii writes: >> From: Matt Armstrong >> Cc: eggert@cs.ucla.edu, 46397@debbugs.gnu.org, craven@gmx.net >> Date: Wed, 17 Mar 2021 16:51:20 -0700 >> >> Thank you for the review Eli. I've incorporated your feedback in the >> attached patches. > > Thanks, we are close. You are welcome. I've quoted your latest feedback below for reference, and attached the resulting patches after incorporating the changes. I also re-ran the new tests. >> I made the warning message even more terse than you suggested because >> before doing so the warnings looked like this: >> >> Warning (unlock-file): Error unlocking file Unlocking file: >> Permission denied, /tmp/inaccessible/foo, ignored [Disable showing] >> [Disable logging] >> >> ...which says "unlock file" too many times. With the current patch it >> is a little bit better: >> >> Warning (unlock-file): Unlocking file: Permission denied, >> /tmp/inaccessible/foo, ignored [Disable showing] [Disable logging] > > Fine with me. > >> * src/filelock.c (unlock_file_body): New function, do what >> unlock_file() used to. > > Please don't use "foo()" to refer to a function 'foo': that looks like > a call of 'foo' with no arguments, which is not what you want. Our > convention is to use 'foo' instead, quoted 'like this'. > >> --- a/doc/lispref/files.texi >> +++ b/doc/lispref/files.texi >> @@ -764,6 +764,8 @@ File Locks >> if the buffer is modified. If the buffer is not modified, then >> the file should not be locked, so this function does nothing. It also >> does nothing if the current buffer is not visiting a file, or is not locked. >> +Handles file system errors by calling @code{display-warning} and continuing > ^^^^^^^ > "This function handles ..." > >> +** 'unlock-buffer' displays warnings instead of signaling. >> +Instead of signaling 'file-error' conditions for file system level >> +errors, the function now calls 'display-warning' and continues as if >> +the error did not occur. ^^^^^^^^^^^^^^^^^^^ > ^^^^^^^^^^^^^^^^^^^^^^^ > I'd rephrase "... and otherwise ignores the error". > >> +(defun userlock--handle-unlock-error (err) >> + "Report an error ERR that occurred while unlocking a file." > > This will sound better if you rename the argument: > > (defun userlock--handle-unlock-error (error) > "Report an ERROR that occurred while unlocking a file."