Variable: emacs-lock-mode-hook
emacs-lock-mode-hook is a customizable variable defined in
emacs-lock.el.gz.
Value
nil
Documentation
Hook run after entering or leaving emacs-lock-mode(var)/emacs-lock-mode(fun).
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lock.el.gz
;;;###autoload
(define-minor-mode emacs-lock-mode
"Toggle Emacs Lock mode in the current buffer.
If called with a plain prefix argument, ask for the locking mode
to be used.
Initially, if the user does not pass an explicit locking mode, it
defaults to `emacs-lock-default-locking-mode' (which see);
afterwards, the locking mode most recently set on the buffer is
used instead.
When called from Elisp code, ARG can be any locking mode:
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
Other values are interpreted as usual.
See also `emacs-lock-unlockable-modes', which exempts buffers under
some major modes from being locked under some circumstances."
:init-value nil
:lighter (""
(emacs-lock--try-unlocking " locked:" " Locked:")
(:eval (symbol-name emacs-lock-mode)))
:group 'emacs-lock
:variable (emacs-lock-mode .
(lambda (mode)
(emacs-lock--set-mode mode arg current-prefix-arg)))
(when emacs-lock-mode
(setq emacs-lock--old-mode emacs-lock-mode)
(setq emacs-lock--try-unlocking
(and (if (eq emacs-lock-unlockable-modes t)
(emacs-lock-live-process-p (current-buffer))
(assq major-mode emacs-lock-unlockable-modes))
t))))