summaryrefslogtreecommitdiff
path: root/src/editfns.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/editfns.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/editfns.c')
-rw-r--r--src/editfns.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 1fcfc7aef63..b553a213e6c 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3876,12 +3876,9 @@ save_restriction_restore (Lisp_Object data)
buf->clip_changed = 1; /* Remember that the narrowing changed. */
}
- /* This isn’t needed anymore, so don’t wait for GC. Do not call
- free_marker on XCAR (data) or XCDR (data), though, since
- record_marker_adjustments may have put them on the buffer’s
- undo list (Bug#30931). Just detach them instead. */
- Fset_marker (XCAR (data), Qnil, Qnil);
- Fset_marker (XCDR (data), Qnil, Qnil);
+ /* Detach the markers, and free the cons instead of waiting for GC. */
+ detach_marker (XCAR (data));
+ detach_marker (XCDR (data));
free_cons (XCONS (data));
}
else