From: Richard M. Stallman Date: Mon, 22 Dec 2008 20:11:51 +0000 (+0000) Subject: (basic-save-buffer): Fix previous change. X-Git-Tag: emacs-pretest-23.0.90~909 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=caba192ed378cf4dcdf4950ae02990e5e4f7b422;p=emacs.git (basic-save-buffer): Fix previous change. --- 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 ;; 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