comparison src/undo.c @ 17447:dc2cb454b330

(Fprimitive_undo): When inserting, always insert after markers (the ordinary kind of insertion).
author Richard M. Stallman <rms@gnu.org>
date Mon, 14 Apr 1997 08:51:18 +0000
parents 855c8d8ba0f0
children 259194f66d40
comparison
equal deleted inserted replaced
17446:8f167ece7e39 17447:dc2cb454b330
475 { 475 {
476 if (pos < BEGV || pos > ZV) 476 if (pos < BEGV || pos > ZV)
477 error ("Changes to be undone are outside visible portion of buffer"); 477 error ("Changes to be undone are outside visible portion of buffer");
478 SET_PT (pos); 478 SET_PT (pos);
479 479
480 /* Insert before markers so that if the mark is 480 /* Now that we record marker adjustments
481 currently on the boundary of this deletion, it 481 (caused by deletion) for undo,
482 ends up on the other side of the now-undeleted 482 we should always insert after markers,
483 text from point. Since undo doesn't even keep 483 so that undoing the marker adjustments
484 track of the mark, this isn't really necessary, 484 put the markers back in the right place. */
485 but it may lead to better behavior in certain 485 Finsert (1, &membuf);
486 situations. */
487 Finsert_before_markers (1, &membuf);
488 SET_PT (pos); 486 SET_PT (pos);
489 } 487 }
490 } 488 }
491 else if (MARKERP (car) && INTEGERP (cdr)) 489 else if (MARKERP (car) && INTEGERP (cdr))
492 { 490 {