summaryrefslogtreecommitdiff
path: root/src/insdel.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-05-01 23:03:36 +0000
committerMiles Bader <miles@gnu.org>2007-05-01 23:03:36 +0000
commita5838eed5ad98bad7dc52f84cdb32e8a08371e5c (patch)
treea6a458310b91728055c995f8411e3eed9fdc8e51 /src/insdel.c
parent7a3c36c6064c9da053392b0d19edb6281ac3a42b (diff)
parent7025f836ad8019af35c1a1866bb6b955a3fde901 (diff)
downloademacs-a5838eed5ad98bad7dc52f84cdb32e8a08371e5c.tar.gz
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 713-725) - Update from CVS - Merge from emacs--rel--22 - Merge from emacs--rel--22: lisp/dired-x.el: Revert 2007-04-06 change. - Merge from gnus--rel--5.10 * emacs--rel--22 (base, patch 1-5) - tag of emacs@sv.gnu.org/emacs--devo--0--patch-709 - Sync to CVS tag EMACS_22_BRANCHPOINT - Sync to CVS branch EMACS_22_BASE - Update from CVS * gnus--rel--5.10 (patch 217) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-202
Diffstat (limited to 'src/insdel.c')
-rw-r--r--src/insdel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/insdel.c b/src/insdel.c
index d7ba13ecbca..c1c1ae882fa 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -1636,8 +1636,12 @@ replace_range (from, to, new, prepare, inherit, markers)
if (! EQ (current_buffer->undo_list, Qt))
{
+ /* Record the insertion first, so that when we undo,
+ the deletion will be undone first. Thus, undo
+ will insert before deleting, and thus will keep
+ the markers before and after this text separate. */
+ record_insert (from + SCHARS (deletion), inschars);
record_delete (from, deletion);
- record_insert (from, inschars);
}
GAP_SIZE -= outgoing_insbytes;