aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorKenichi Handa <[email protected]>2000-06-06 05:43:12 +0000
committerKenichi Handa <[email protected]>2000-06-06 05:43:12 +0000
commited00559de2909e79027b6df69bc76894f3e105da (patch)
treedd59b0526b8c4486a0253ebe1926672cfb351114 /src/buffer.c
parent8e624fa2af105104d1656a27ed242f8179445232 (diff)
(Fset_buffer_multibyte): Don't make the current buffer as modified if
it is originally unmodified.
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 cc376c9623..e7f6db096f 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1875,6 +1875,7 @@ but the contents viewed as characters do change.")
int undo_enabled_p = !EQ (current_buffer->undo_list, Qt);
int begv = BEGV, zv = ZV;
int narrowed = (BEG != begv || Z != zv);
+ int modified_p = !NILP (Fbuffer_modified_p (Qnil));
if (current_buffer->base_buffer)
error ("Cannot do `set-buffer-multibyte' on an indirect buffer");
@@ -2105,6 +2106,10 @@ but the contents viewed as characters do change.")
other->prevent_redisplay_optimizations_p = 1;
}
+ /* Restore the modifiedness of the buffer. */
+ if (!modified_p && !NILP (Fbuffer_modified_p (Qnil)))
+ Fset_buffer_modified_p (Qnil);
+
return flag;
}