emacs-lock-mode is a variable defined in `emacs-lock.el'.
Its value is

  • Automatically becomes permanently buffer-local when set.

If non-nil, the current buffer is locked.
It can be one of the following values:
exit -- Emacs cannot exit while the buffer is locked
kill -- the buffer cannot be killed, but Emacs can exit as usual
all -- the buffer is locked against both actions
nil -- the buffer is not locked