diff options
author | Richard M. Stallman <rms@gnu.org> | 2008-12-22 20:20:25 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2008-12-22 20:20:25 +0000 |
commit | 348a60a8f3ee881a5fbeda36ae73bec64c6237ac (patch) | |
tree | 6634168255220721c8c332e6fc126fd0afb60cef /lisp/shadowfile.el | |
parent | caba192ed378cf4dcdf4950ae02990e5e4f7b422 (diff) | |
download | emacs-348a60a8f3ee881a5fbeda36ae73bec64c6237ac.tar.gz |
(shadow-copy-file): Handle buffer-swapped-with.
Diffstat (limited to 'lisp/shadowfile.el')
-rw-r--r-- | lisp/shadowfile.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el index 751a33d260d..ece12c367e1 100644 --- a/lisp/shadowfile.el +++ b/lisp/shadowfile.el @@ -574,8 +574,14 @@ site." (when buffer (set-buffer buffer) (condition-case i - (progn - (write-region nil nil to) + (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)) (shadow-remove-from-todo s)) (error (message "Shadow %s not updated!" (cdr s))))))) |