From: Eli Zaretskii Date: Fri, 6 Dec 2013 15:13:35 +0000 (+0200) Subject: Fix bug #16070 with crashes when toggling buffer's multibyteness. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~536 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6d6aa291f262d6dba7a92f411d5f46789c8413a0;p=emacs.git Fix bug #16070 with crashes when toggling buffer's multibyteness. src/buffer.c (Fset_buffer_multibyte): Invalidate buffer caches. --- diff --git a/src/ChangeLog b/src/ChangeLog index 9867527e28f..082102bc3d8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-12-06 Eli Zaretskii + + * buffer.c (Fset_buffer_multibyte): Invalidate buffer caches. + (Bug#16070) + 2013-12-06 Dmitry Antipov * xterm.c (input_signal_count): Remove. diff --git a/src/buffer.c b/src/buffer.c index b40dc8cb3b7..e4a550fed95 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2482,6 +2482,8 @@ current buffer is cleared. */) if (narrowed) error ("Changing multibyteness in a narrowed buffer"); + invalidate_buffer_caches (current_buffer, BEGV, ZV); + if (NILP (flag)) { ptrdiff_t pos, stop;