]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug with uninitialized undo list of an indirect buffer (Bug#18180).
authorDmitry Antipov <dmantipov@yandex.ru>
Tue, 5 Aug 2014 06:04:38 +0000 (10:04 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Tue, 5 Aug 2014 06:04:38 +0000 (10:04 +0400)
* buffer.c (Fmake_indirect_buffer): Initialize undo list with the
base buffer's undo list.

src/ChangeLog
src/buffer.c

index 3f9b4577460e3936975e26089bfc89d89e78eaf9..de56e3501d8c6c2861908fb841b5a82ae4222cae 100644 (file)
@@ -1,3 +1,9 @@
+2014-08-05  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Fix bug with uninitialized undo list of an indirect buffer (Bug#18180).
+       * buffer.c (Fmake_indirect_buffer): Initialize undo list with the
+       base buffer's undo list.
+
 2014-08-03  Dmitry Antipov  <dmantipov@yandex.ru>
 
        Fix bug with an attempt to select uninitialized frame (Bug#18161).
index 8077e47fa0bf8dd650f312b72d28544baf6b1e54..495f937d83f7f502a4a243e45b1da6caa4a4d072 100644 (file)
@@ -809,6 +809,9 @@ CLONE nil means the indirect buffer's state is reset to default values.  */)
   set_string_intervals (name, NULL);
   bset_name (b, name);
 
+  /* An indirect buffer shares undo list of its base (Bug#18180).  */
+  bset_undo_list (b, BVAR (b->base_buffer, undo_list));
+
   reset_buffer (b);
   reset_buffer_local_variables (b, 1);