Mercurial > emacs
diff src/undo.c @ 98295:a7da9fedfcf9
(record_point): Don't call Fundo_boundary for first
change. (Bug#731)
| author | Martin Rudalics <rudalics@gmx.at> |
|---|---|
| date | Mon, 22 Sep 2008 15:37:42 +0000 |
| parents | 8971ddf55736 |
| children | e038c1a8307c |
line wrap: on
line diff
--- a/src/undo.c Mon Sep 22 15:21:40 2008 +0000 +++ b/src/undo.c Mon Sep 22 15:37:42 2008 +0000 @@ -79,7 +79,13 @@ if (NILP (pending_boundary)) pending_boundary = Fcons (Qnil, Qnil); - if (current_buffer != last_undo_buffer) + if ((current_buffer != last_undo_buffer) + /* Don't call Fundo_boundary for the first change. Otherwise we + risk overwriting last_boundary_position in Fundo_boundary with + PT of the current buffer and as a consequence not insert an + undo boundary because last_boundary_position will equal pt in + the test at the end of the present function (Bug#731). */ + && (MODIFF > SAVE_MODIFF)) Fundo_boundary (); last_undo_buffer = current_buffer;
