]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lock.el
Add submodule support to f90.el.
[gnu-emacs] / lisp / emacs-lock.el
index dc93f093f9e79fde129dcdbcc6da9f202ad80234..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 Free Software Foundation, Inc
+;; Copyright (C) 1994, 1997, 2001-2011 Free Software Foundation, Inc
 
 ;; Author: Tom Wurgler <twurgler@goodyear.com>
 ;; Created: 12/8/94
@@ -9,10 +8,10 @@
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,9 +19,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -79,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)
@@ -91,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)
@@ -100,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