diff options
| author | Richard M. Stallman | 2008-12-22 20:20:25 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2008-12-22 20:20:25 +0000 |
| commit | 348a60a8f3ee881a5fbeda36ae73bec64c6237ac (patch) | |
| tree | 6634168255220721c8c332e6fc126fd0afb60cef | |
| parent | caba192ed378cf4dcdf4950ae02990e5e4f7b422 (diff) | |
| download | emacs-348a60a8f3ee881a5fbeda36ae73bec64c6237ac.tar.gz emacs-348a60a8f3ee881a5fbeda36ae73bec64c6237ac.zip | |
(shadow-copy-file): Handle buffer-swapped-with.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/shadowfile.el | 10 |
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 @@ | |||
| 1 | 2008-12-22 Richard M Stallman <rms@gnu.org> | 1 | 2008-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 | ||
| 5 | 2008-12-22 Ulf Jasper <ulf.jasper@web.de> | 11 | 2008-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 | ||