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 | |
| 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.
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/buffer.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 20153803848..0bd177aa4e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2000-06-06 Kenichi Handa <handa@etl.go.jp> | 1 | 2000-06-06 Kenichi Handa <handa@etl.go.jp> |
| 2 | 2 | ||
| 3 | * buffer.c (Fset_buffer_multibyte): Don't make the current buffer | ||
| 4 | as modified if it is originally unmodified. | ||
| 5 | |||
| 3 | * term.c (encode_terminal_code): Change the way to check if | 6 | * term.c (encode_terminal_code): Change the way to check if |
| 4 | terminal coding does any conversion. | 7 | terminal coding does any conversion. |
| 5 | (append_glyph): Set glyph->pixel_width correctly. | 8 | (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.") | |||
| 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 | ||