From caba192ed378cf4dcdf4950ae02990e5e4f7b422 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 22 Dec 2008 20:11:51 +0000 Subject: [PATCH] (basic-save-buffer): Fix previous change. --- lisp/files.el | 6 ++++-- 1 file 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 ;; 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 -- 2.39.2