summaryrefslogtreecommitdiff
path: root/src/insdel.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-03-30 14:23:55 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-03-30 14:26:26 -0700
commit6f66a43d7ad6cada2b7dbb6d07efe36be1dc7ecb (patch)
tree1a4fe997bc0d2997c3f7df516bba4331c3dccbbd /src/insdel.c
parent96b8747d5c5d747af13fd84d8fe0308ef2a0ea7a (diff)
downloademacs-6f66a43d7ad6cada2b7dbb6d07efe36be1dc7ecb.tar.gz
Centralize Bug#30931 fix
* src/marker.c (detach_marker): New function. * src/editfns.c (save_restriction_restore): * src/insdel.c (signal_before_change): Use it.
Diffstat (limited to 'src/insdel.c')
-rw-r--r--src/insdel.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/insdel.c b/src/insdel.c
index 697395c507b..173c2438347 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -2148,13 +2148,10 @@ signal_before_change (ptrdiff_t start_int, ptrdiff_t end_int,
FETCH_START, FETCH_END, Qnil);
}
- /* Detach the markers now that we're done with them. Don't directly
- free them, since the change functions could have caused them to
- be inserted into the undo list (Bug#30931). */
if (! NILP (start_marker))
- Fset_marker (start_marker, Qnil, Qnil);
+ detach_marker (start_marker);
if (! NILP (end_marker))
- Fset_marker (end_marker, Qnil, Qnil);
+ detach_marker (end_marker);
RESTORE_VALUE;
unbind_to (count, Qnil);