]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lock.el
Add submodule support to f90.el.
[gnu-emacs] / lisp / emacs-lock.el
index 3e3216c29abbbf42bd1d1d7c4721050e05674c7d..1553aeae0d5a72f45feaf4dc5339f5157e318c0c 100644 (file)
@@ -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 <twurgler@goodyear.com>
 ;; 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