changeset 29456:1aa0c1122f75

(Fset_buffer_multibyte): Don't make the current buffer as modified if it is originally unmodified.
author Kenichi Handa <handa@m17n.org>
date Tue, 06 Jun 2000 05:41:20 +0000
parents 31011bd2d2f0
children 690da56ef774
files src/buffer.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }