]> code.delx.au - gnu-emacs/blobdiff - lisp/saveplace.el
Merge from trunk.
[gnu-emacs] / lisp / saveplace.el
index a72d3c4345647eb17171853a93bf32af2659c75b..2d1586d895a53beff42910329942ca67765213e9 100644 (file)
@@ -1,7 +1,6 @@
 ;;; saveplace.el --- automatically save place in files
 
-;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc.
 
 ;; Author: Karl Fogel <kfogel@red-bean.com>
 ;; Maintainer: FSF
@@ -286,7 +285,7 @@ may have changed\) back to `save-place-alist'."
   (let ((cell (assoc buffer-file-name save-place-alist)))
     (if cell
        (progn
-         (or after-find-file-from-revert-buffer
+         (or revert-buffer-in-progress-p
              (goto-char (cdr cell)))
           ;; and make sure it will be saved again for later
           (setq save-place t)))))
@@ -301,7 +300,8 @@ may have changed\) back to `save-place-alist'."
 
 (add-hook 'find-file-hook 'save-place-find-file-hook t)
 
-(add-hook 'kill-emacs-hook 'save-place-kill-emacs-hook)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook 'save-place-kill-emacs-hook))
 
 (add-hook 'kill-buffer-hook 'save-place-to-alist)