aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2008-12-22 20:20:25 +0000
committerRichard M. Stallman2008-12-22 20:20:25 +0000
commit348a60a8f3ee881a5fbeda36ae73bec64c6237ac (patch)
tree6634168255220721c8c332e6fc126fd0afb60cef
parentcaba192ed378cf4dcdf4950ae02990e5e4f7b422 (diff)
downloademacs-348a60a8f3ee881a5fbeda36ae73bec64c6237ac.tar.gz
emacs-348a60a8f3ee881a5fbeda36ae73bec64c6237ac.zip
(shadow-copy-file): Handle buffer-swapped-with.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/shadowfile.el10
2 files changed, 14 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 15ef4269f51..5c15bfb1f4d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,11 @@
12008-12-22 Richard M Stallman <rms@gnu.org> 12008-12-22 Richard M Stallman <rms@gnu.org>
2 2
3 * shadowfile.el (shadow-copy-file): Handle buffer-swapped-with.
4
5 * files.el (buffer-swapped-with): New variable.
6 (basic-save-buffer-0): Most of basic-save-buffer moved here.
7 (basic-save-buffer): Unswap the buffer temporarily if nec.
8
3 * dired.el (dired-readin): Inhibit modification hooks. 9 * dired.el (dired-readin): Inhibit modification hooks.
4 10
52008-12-22 Ulf Jasper <ulf.jasper@web.de> 112008-12-22 Ulf Jasper <ulf.jasper@web.de>
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."
574 (when buffer 574 (when buffer
575 (set-buffer buffer) 575 (set-buffer buffer)
576 (condition-case i 576 (condition-case i
577 (progn 577 (progn
578 (write-region nil nil to) 578 (if buffer-swapped-with
579 (progn
580 (buffer-swap-text buffer-swapped-with)
581 (unwind-protect
582 (write-region nil nil to)
583 (buffer-swap-text buffer-swapped-with)))
584 (write-region nil nil to))
579 (shadow-remove-from-todo s)) 585 (shadow-remove-from-todo s))
580 (error (message "Shadow %s not updated!" (cdr s))))))) 586 (error (message "Shadow %s not updated!" (cdr s)))))))
581 587