# HG changeset patch # User Richard M. Stallman # Date 923685626 0 # Node ID a9eb0deae6c0a08605c73cf4a6f60374744a8b15 # Parent 5ee655f7a49b58c7fa4fbe9b7d19992a2808c1c9 (Fmake_indirect_buffer): Copy multibyte status from the base buffer. (Fset_buffer_multibyte): Copy new multibyte status into the buffer's indirect buffers. diff -r 5ee655f7a49b -r a9eb0deae6c0 src/buffer.c --- 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; }