Mercurial > emacs
diff src/buffer.c @ 24604:a9eb0deae6c0
(Fmake_indirect_buffer): Copy multibyte status from the base buffer.
(Fset_buffer_multibyte): Copy new multibyte status
into the buffer's indirect buffers.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Fri, 09 Apr 1999 19:20:26 +0000 |
| parents | e8b7cb3fac8c |
| children | 8f4601c1e4e5 |
line wrap: on
line diff
--- a/src/buffer.c Fri Apr 09 13:51:19 1999 +0000 +++ b/src/buffer.c Fri Apr 09 19:20:26 1999 +0000 @@ -466,6 +466,9 @@ b->mark = Fmake_marker (); b->name = name; + /* The multibyte status belongs to the base buffer. */ + b->enable_multibyte_characters = b->base_buffer->enable_multibyte_characters; + /* Make sure the base buffer has markers for its narrowing. */ if (NILP (b->base_buffer->pt_marker)) { @@ -1735,6 +1738,7 @@ Lisp_Object flag; { Lisp_Object tail, markers; + struct buffer *other; if (current_buffer->base_buffer) error ("Cannot do `set-buffer-multibyte' on an indirect buffer"); @@ -1852,6 +1856,13 @@ set_intervals_multibyte (1); } + /* Copy this buffer's new multibyte status + into all of its indirect buffers. */ + for (other = all_buffers; other; other = other->next) + if (other->base_buffer == current_buffer && !NILP (other->name)) + other->enable_multibyte_characters + = current_buffer->enable_multibyte_characters; + return flag; }
