Commit ed00559d authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(Fset_buffer_multibyte): Don't make the current buffer as modified if

it is originally unmodified.
parent 8e624fa2
No preview for this file type
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment