]> code.delx.au - gnu-emacs/blobdiff - lisp/shadowfile.el
* lib/ignore-value.h: New file.
[gnu-emacs] / lisp / shadowfile.el
index ece12c367e12c5265742e7f426da8db801c72d39..c88b55e964bc501cab60556b68928b4a6c1dc99e 100644 (file)
@@ -1,7 +1,6 @@
 ;;; shadowfile.el --- automatic file copying
 
-;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc.
 
 ;; Author: Boris Goldowsky <boris@gnu.org>
 ;; Keywords: comm files
@@ -510,7 +509,7 @@ Pending copies are stored in variable `shadow-files-to-copy', and in
 call it manually."
   (interactive "P")
   (if (not shadow-files-to-copy)
-      (if (interactive-p)
+      (if (called-interactively-p 'interactive)
          (message "No files need to be shadowed."))
     (save-excursion
       (map-y-or-n-p (function
@@ -575,13 +574,7 @@ site."
       (set-buffer buffer)
       (condition-case i
          (progn
-           (if buffer-swapped-with
-               (progn
-                 (buffer-swap-text buffer-swapped-with)
-                 (unwind-protect
-                     (write-region nil nil to)
-                   (buffer-swap-text buffer-swapped-with)))
-             (write-region nil nil to))
+            (write-region nil nil to)
             (shadow-remove-from-todo s))
         (error (message "Shadow %s not updated!" (cdr s)))))))
 
@@ -713,8 +706,7 @@ With non-nil argument also saves the buffer."
 
 (defun shadow-save-todo-file ()
   (if (and shadow-todo-buffer (buffer-modified-p shadow-todo-buffer))
-      (save-excursion
-       (set-buffer shadow-todo-buffer)
+      (with-current-buffer shadow-todo-buffer
        (condition-case nil             ; have to continue even in case of
            (basic-save-buffer)         ; error, otherwise kill-emacs might
          (error                        ; not work!
@@ -839,5 +831,4 @@ look for files that have been changed and need to be copied to other systems."
 
 (provide 'shadowfile)
 
-;; arch-tag: e2f4cdd7-2bab-4def-9130-9e69b412b79e
 ;;; shadowfile.el ends here