summaryrefslogtreecommitdiff
path: root/lisp/emacs-lock.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2011-03-06 01:30:16 +0100
committerJuanma Barranquero <lekktu@gmail.com>2011-03-06 01:30:16 +0100
commit845fc5e555e73449596ba475060fd2674f3b51e9 (patch)
tree5f039af84ae06b3378829c498190df480c75ac84 /lisp/emacs-lock.el
parentd3877e8f063815efe92b3bced08f54f9c1644b74 (diff)
downloademacs-845fc5e555e73449596ba475060fd2674f3b51e9.tar.gz
* lisp/bookmark.el:
* lisp/desktop.el: * lisp/emacs-lock.el: * lisp/ps-print.el: * lisp/saveplace.el: * lisp/net/tramp-cache.el: * lisp/textmodes/reftex.el: * lisp/org/org-id.el: Don't set `kill-emacs-hook' on noninteractive sessions. Fixes: debbugs:8137
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)