diff options
| author | Noam Postavsky | 2018-03-30 16:44:24 -0400 |
|---|---|---|
| committer | Paul Eggert | 2018-03-30 14:26:25 -0700 |
| commit | 96b8747d5c5d747af13fd84d8fe0308ef2a0ea7a (patch) | |
| tree | 1b7cd8463b098f6386b0b8be81f1ab755b6308b9 /src/alloc.c | |
| parent | 842b3d7412eaed6b2c9f90c3361abb4932ec0b1d (diff) | |
| download | emacs-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.c | 9 |
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 | |||
| 3883 | void | ||
| 3884 | free_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 |