diff options
author | Kenichi Handa <handa@m17n.org> | 2000-06-06 05:43:12 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2000-06-06 05:43:12 +0000 |
commit | ed00559de2909e79027b6df69bc76894f3e105da (patch) | |
tree | dd59b0526b8c4486a0253ebe1926672cfb351114 /src/buffer.c | |
parent | 8e624fa2af105104d1656a27ed242f8179445232 (diff) | |
download | emacs-ed00559de2909e79027b6df69bc76894f3e105da.tar.gz |
(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.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |