summaryrefslogtreecommitdiff
path: root/src/insdel.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-03-30 14:23:55 -0700
committerNoam Postavsky <npostavs@gmail.com>2018-06-03 12:48:13 -0400
commit51ee8bc4483d3608f4355777aeabbb31887326d9 (patch)
tree6807eeeac57c265955b8064426e39d6f4e9bdac6 /src/insdel.c
parentdaa602338fd91aced720b5555c8b6ed389383831 (diff)
downloademacs-51ee8bc4483d3608f4355777aeabbb31887326d9.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. (cherry picked from commit 6f66a43d7ad6cada2b7dbb6d07efe36be1dc7ecb)
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);