Function: unlock-buffer
unlock-buffer is a function defined in filelock.c.
Signature
(unlock-buffer)
Documentation
Unlock the file visited in the current buffer.
If the buffer is not modified, this does nothing because the file
should not be locked in that case. It also does nothing if the
current buffer is not visiting a file, or is not locked. Handles file
system errors by calling display-warning and continuing as if the
error did not occur.
Other relevant functions are documented in the buffer group.
Probably introduced at or before Emacs version 28.1.
Shortdoc
;; buffer
(unlock-buffer)
Source Code
// Defined in /usr/src/emacs/src/filelock.c
{
if (SAVE_MODIFF < MODIFF
&& STRINGP (BVAR (current_buffer, file_truename)))
Funlock_file (BVAR (current_buffer, file_truename));
return Qnil;
}