summaryrefslogtreecommitdiff
path: root/src/editfns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 727f2d0080c..84de6792738 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3899,10 +3899,12 @@ 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). */
+ /* 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);
free_cons (XCONS (data));
}
else