(Fset_buffer_multibyte): Error if marker is put
[bpt/emacs.git] / src / buffer.c
index e781d25..70cb13a 100644 (file)
@@ -1822,6 +1822,12 @@ but the contents viewed as characters do change.")
 
          tail = XMARKER (tail)->chain;
        }
+
+      /* Make sure no markers were put on the chain
+        while the chain value was incorrect.  */
+      if (! EQ (BUF_MARKERS (current_buffer), Qnil))
+       abort ();
+
       BUF_MARKERS (current_buffer) = markers;
 
       /* Do this last, so it can calculate the new correspondences