summaryrefslogtreecommitdiff
path: root/lisp/emacs-lock.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lock.el')
-rw-r--r--lisp/emacs-lock.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el
index 22795a47d98..6033648298d 100644
--- a/lisp/emacs-lock.el
+++ b/lisp/emacs-lock.el
@@ -88,7 +88,8 @@ If the buffer is locked, signal error and display its name."
(if emacs-lock-buffer-locked
(setq emacs-lock-from-exiting t)))
-(add-hook 'kill-emacs-hook 'check-emacs-lock)
+(unless noninteractive
+ (add-hook 'kill-emacs-hook 'check-emacs-lock))
(add-hook 'kill-buffer-hook 'emacs-lock-check-buffer-lock)
(add-hook 'shell-mode-hook 'emacs-lock-was-buffer-locked)
(add-hook 'shell-mode-hook 'emacs-lock-shell-sentinel)