aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/files.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el
index a7c7902629d..dc34ba66016 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4085,10 +4085,12 @@ Before and after saving the buffer, this function runs
4085 ;; If this buffer's real contents are "swapped" with some other buffer, 4085 ;; If this buffer's real contents are "swapped" with some other buffer,
4086 ;; temporarily unswap in order to save the real contents. 4086 ;; temporarily unswap in order to save the real contents.
4087 (unwind-protect 4087 (unwind-protect
4088 (progn 4088 (let ((modp (buffer-modified-p)))
4089 (buffer-swap-text buffer-swapped-with) 4089 (buffer-swap-text buffer-swapped-with)
4090 (set-buffer-modified-p modp)
4090 (basic-save-buffer-0)) 4091 (basic-save-buffer-0))
4091 (buffer-swap-text buffer-swapped-with)))) 4092 (buffer-swap-text buffer-swapped-with)
4093 (set-buffer-modified-p nil))))
4092 4094
4093(defun basic-save-buffer-0 () 4095(defun basic-save-buffer-0 ()
4094 (save-current-buffer 4096 (save-current-buffer