Commit abc9d959 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Fmake_indirect_buffer): Copy multibyte status from the base buffer.

(Fset_buffer_multibyte): Copy new multibyte status
into the buffer's indirect buffers.
parent 3b72e81d
......@@ -466,6 +466,9 @@ NAME should be a string which is not the name of an existing buffer.")
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 @@ but the contents viewed as characters do change.")
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 @@ but the contents viewed as characters do change.")
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))
= current_buffer->enable_multibyte_characters;
return flag;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment