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

  • Automatically becomes buffer-local when set.
  • This variable is an alias for `emacs-lock-mode'.
  • This variable is obsolete since 24.1;
    use `emacs-lock-mode' instead.

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