X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/7b1019e2781472c793d0bf74e2b9ee17894270b8..5d8e0d43b0fdc1b67f745e66c1539c5135fb2808:/lisp/emacs-lock.el diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el index 3e3216c29a..1553aeae0d 100644 --- a/lisp/emacs-lock.el +++ b/lisp/emacs-lock.el @@ -1,7 +1,6 @@ ;;; emacs-lock.el --- prevents you from exiting Emacs if a buffer is locked -;; Copyright (C) 1994, 1997, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc +;; Copyright (C) 1994, 1997, 2001-2011 Free Software Foundation, Inc ;; Author: Tom Wurgler ;; Created: 12/8/94 @@ -77,7 +76,7 @@ If the buffer is locked, signal error and display its name." (set-process-sentinel (get-buffer-process (buffer-name)) (function emacs-lock-clear-sentinel))) -(defun emacs-lock-clear-sentinel (proc str) +(defun emacs-lock-clear-sentinel (_proc _str) (if emacs-lock-from-exiting (progn (setq emacs-lock-from-exiting nil) @@ -89,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) @@ -98,5 +98,4 @@ If the buffer is locked, signal error and display its name." (provide 'emacs-lock) -;; arch-tag: 58e6cb43-7cf0-401a-bcb6-4902a0b8bdc1 ;;; emacs-lock.el ends here