diff options
| author | Kenichi Handa | 2000-06-06 05:43:12 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-06-06 05:43:12 +0000 |
| commit | ed00559de2909e79027b6df69bc76894f3e105da (patch) | |
| tree | dd59b0526b8c4486a0253ebe1926672cfb351114 /src/buffer.c | |
| parent | 8e624fa2af105104d1656a27ed242f8179445232 (diff) | |
| download | emacs-ed00559de2909e79027b6df69bc76894f3e105da.tar.gz emacs-ed00559de2909e79027b6df69bc76894f3e105da.zip | |
(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.") | |||
| 1875 | int undo_enabled_p = !EQ (current_buffer->undo_list, Qt); | 1875 | int undo_enabled_p = !EQ (current_buffer->undo_list, Qt); |
| 1876 | int begv = BEGV, zv = ZV; | 1876 | int begv = BEGV, zv = ZV; |
| 1877 | int narrowed = (BEG != begv || Z != zv); | 1877 | int narrowed = (BEG != begv || Z != zv); |
| 1878 | int modified_p = !NILP (Fbuffer_modified_p (Qnil)); | ||
| 1878 | 1879 | ||
| 1879 | if (current_buffer->base_buffer) | 1880 | if (current_buffer->base_buffer) |
| 1880 | error ("Cannot do `set-buffer-multibyte' on an indirect buffer"); | 1881 | error ("Cannot do `set-buffer-multibyte' on an indirect buffer"); |
| @@ -2105,6 +2106,10 @@ but the contents viewed as characters do change.") | |||
| 2105 | other->prevent_redisplay_optimizations_p = 1; | 2106 | other->prevent_redisplay_optimizations_p = 1; |
| 2106 | } | 2107 | } |
| 2107 | 2108 | ||
| 2109 | /* Restore the modifiedness of the buffer. */ | ||
| 2110 | if (!modified_p && !NILP (Fbuffer_modified_p (Qnil))) | ||
| 2111 | Fset_buffer_modified_p (Qnil); | ||
| 2112 | |||
| 2108 | return flag; | 2113 | return flag; |
| 2109 | } | 2114 | } |
| 2110 | 2115 | ||