From: Kenichi Handa Date: Tue, 6 Jun 2000 05:43:12 +0000 (+0000) Subject: (Fset_buffer_multibyte): Don't make the current buffer as modified if X-Git-Tag: emacs-pretest-21.0.90~3491 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ed00559de2909e79027b6df69bc76894f3e105da;p=emacs.git (Fset_buffer_multibyte): Don't make the current buffer as modified if it is originally unmodified. --- diff --git a/src/ChangeLog b/src/ChangeLog index 20153803848..0bd177aa4e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2000-06-06 Kenichi Handa + * buffer.c (Fset_buffer_multibyte): Don't make the current buffer + as modified if it is originally unmodified. + * term.c (encode_terminal_code): Change the way to check if terminal coding does any conversion. (append_glyph): Set glyph->pixel_width correctly. 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.") 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; }