]> git.eshelyaron.com Git - emacs.git/commitdiff
(basic-save-buffer): Fix previous change.
authorRichard M. Stallman <rms@gnu.org>
Mon, 22 Dec 2008 20:11:51 +0000 (20:11 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 22 Dec 2008 20:11:51 +0000 (20:11 +0000)
lisp/files.el

index a7c7902629da7b42f274456e9352000aedf4fbe2..dc34ba660168c9594c92b35a43a645a77e60bbbd 100644 (file)
@@ -4085,10 +4085,12 @@ Before and after saving the buffer, this function runs
     ;; If this buffer's real contents are "swapped" with some other buffer,
     ;; temporarily unswap in order to save the real contents.
     (unwind-protect
-       (progn
+       (let ((modp (buffer-modified-p)))
          (buffer-swap-text buffer-swapped-with)
+         (set-buffer-modified-p modp)
          (basic-save-buffer-0))
-      (buffer-swap-text buffer-swapped-with))))
+      (buffer-swap-text buffer-swapped-with)
+      (set-buffer-modified-p nil))))
 
 (defun basic-save-buffer-0 ()
   (save-current-buffer