# HG changeset patch # User Kenichi Handa # Date 960270080 0 # Node ID 1aa0c1122f7598e1ee2263093e2e5716efc4bd38 # Parent 31011bd2d2f0bc0122e7ab9c314030567ffe1b3c (Fset_buffer_multibyte): Don't make the current buffer as modified if it is originally unmodified. diff -r 31011bd2d2f0 -r 1aa0c1122f75 src/buffer.c --- a/src/buffer.c Tue Jun 06 02:51:52 2000 +0000 +++ b/src/buffer.c Tue Jun 06 05:41:20 2000 +0000 @@ -1875,6 +1875,7 @@ 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 @@ 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; }