aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 1089872ebe7..9c9653910b1 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -466,6 +466,9 @@ NAME should be a string which is not the name of an existing buffer.")
466 b->mark = Fmake_marker (); 466 b->mark = Fmake_marker ();
467 b->name = name; 467 b->name = name;
468 468
469 /* The multibyte status belongs to the base buffer. */
470 b->enable_multibyte_characters = b->base_buffer->enable_multibyte_characters;
471
469 /* Make sure the base buffer has markers for its narrowing. */ 472 /* Make sure the base buffer has markers for its narrowing. */
470 if (NILP (b->base_buffer->pt_marker)) 473 if (NILP (b->base_buffer->pt_marker))
471 { 474 {
@@ -1735,6 +1738,7 @@ but the contents viewed as characters do change.")
1735 Lisp_Object flag; 1738 Lisp_Object flag;
1736{ 1739{
1737 Lisp_Object tail, markers; 1740 Lisp_Object tail, markers;
1741 struct buffer *other;
1738 1742
1739 if (current_buffer->base_buffer) 1743 if (current_buffer->base_buffer)
1740 error ("Cannot do `set-buffer-multibyte' on an indirect buffer"); 1744 error ("Cannot do `set-buffer-multibyte' on an indirect buffer");
@@ -1852,6 +1856,13 @@ but the contents viewed as characters do change.")
1852 set_intervals_multibyte (1); 1856 set_intervals_multibyte (1);
1853 } 1857 }
1854 1858
1859 /* Copy this buffer's new multibyte status
1860 into all of its indirect buffers. */
1861 for (other = all_buffers; other; other = other->next)
1862 if (other->base_buffer == current_buffer && !NILP (other->name))
1863 other->enable_multibyte_characters
1864 = current_buffer->enable_multibyte_characters;
1865
1855 return flag; 1866 return flag;
1856} 1867}
1857 1868