aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index cc376c96238..e7f6db096fd 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1875,6 +1875,7 @@ but the contents viewed as characters do change.")
1875 int undo_enabled_p = !EQ (current_buffer->undo_list, Qt); 1875 int undo_enabled_p = !EQ (current_buffer->undo_list, Qt);
1876 int begv = BEGV, zv = ZV; 1876 int begv = BEGV, zv = ZV;
1877 int narrowed = (BEG != begv || Z != zv); 1877 int narrowed = (BEG != begv || Z != zv);
1878 int modified_p = !NILP (Fbuffer_modified_p (Qnil));
1878 1879
1879 if (current_buffer->base_buffer) 1880 if (current_buffer->base_buffer)
1880 error ("Cannot do `set-buffer-multibyte' on an indirect buffer"); 1881 error ("Cannot do `set-buffer-multibyte' on an indirect buffer");
@@ -2105,6 +2106,10 @@ but the contents viewed as characters do change.")
2105 other->prevent_redisplay_optimizations_p = 1; 2106 other->prevent_redisplay_optimizations_p = 1;
2106 } 2107 }
2107 2108
2109 /* Restore the modifiedness of the buffer. */
2110 if (!modified_p && !NILP (Fbuffer_modified_p (Qnil)))
2111 Fset_buffer_modified_p (Qnil);
2112
2108 return flag; 2113 return flag;
2109} 2114}
2110 2115