Variable: lock-file-mode-hook
lock-file-mode-hook is a customizable variable defined in files.el.gz.
Value
nil
Documentation
Hook run after entering or leaving lock-file-mode(var)/lock-file-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/files.el.gz
(define-minor-mode lock-file-mode
"Toggle file locking in the current buffer (Lock File mode)."
:version "28.1"
(setq-local create-lockfiles (and lock-file-mode t)))