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
commitcf5549cdce2f6f3154610530d35afd90aa9f2d5f (patch)
tree7ce88e5027b090062d55d05c8143484948f2a805 /lisp/emacs-lock.el
parentac73498c61e5f2792208c11c1dd146e1eee35eac (diff)
downloademacs-cf5549cdce2f6f3154610530d35afd90aa9f2d5f.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.
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)