aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorNoam Postavsky2018-03-30 16:44:24 -0400
committerPaul Eggert2018-03-30 14:26:25 -0700
commit96b8747d5c5d747af13fd84d8fe0308ef2a0ea7a (patch)
tree1b7cd8463b098f6386b0b8be81f1ab755b6308b9 /src/alloc.c
parent842b3d7412eaed6b2c9f90c3361abb4932ec0b1d (diff)
downloademacs-96b8747d5c5d747af13fd84d8fe0308ef2a0ea7a.tar.gz
emacs-96b8747d5c5d747af13fd84d8fe0308ef2a0ea7a.zip
Fix another case of freed markers in the undo-list (Bug#30931)
* src/alloc.c (free_marker): Remove. * src/editfns.c (save_restriction_restore): * src/insdel.c (signal_before_change): Detach the markers from the buffer when we're done with them instead of calling free_marker on them. * test/src/editfns-tests.el (delete-region-undo-markers-1) (delete-region-undo-markers-2): New tests.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 369592d70ee..9fdcc7306a8 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3878,15 +3878,6 @@ build_marker (struct buffer *buf, ptrdiff_t charpos, ptrdiff_t bytepos)
3878 return obj; 3878 return obj;
3879} 3879}
3880 3880
3881/* Put MARKER back on the free list after using it temporarily. */
3882
3883void
3884free_marker (Lisp_Object marker)
3885{
3886 unchain_marker (XMARKER (marker));
3887 free_misc (marker);
3888}
3889
3890 3881
3891/* Return a newly created vector or string with specified arguments as 3882/* Return a newly created vector or string with specified arguments as
3892 elements. If all the arguments are characters that can fit 3883 elements. If all the arguments are characters that can fit