diff options
| author | Noam Postavsky | 2018-03-30 16:44:24 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2018-06-03 12:48:13 -0400 |
| commit | daa602338fd91aced720b5555c8b6ed389383831 (patch) | |
| tree | b859b9a568d8b18d0f67cdfeee62c93a3bbcc299 /src/alloc.c | |
| parent | 7460840a6c9ab713e8ccc470011495fdb86a61d7 (diff) | |
| download | emacs-daa602338fd91aced720b5555c8b6ed389383831.tar.gz emacs-daa602338fd91aced720b5555c8b6ed389383831.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.
(cherry picked from commit 96b8747d5c5d747af13fd84d8fe0308ef2a0ea7a)
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 c3f7920ed87..09d61b7e5f3 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3884,15 +3884,6 @@ build_marker (struct buffer *buf, ptrdiff_t charpos, ptrdiff_t bytepos) | |||
| 3884 | return obj; | 3884 | return obj; |
| 3885 | } | 3885 | } |
| 3886 | 3886 | ||
| 3887 | /* Put MARKER back on the free list after using it temporarily. */ | ||
| 3888 | |||
| 3889 | void | ||
| 3890 | free_marker (Lisp_Object marker) | ||
| 3891 | { | ||
| 3892 | unchain_marker (XMARKER (marker)); | ||
| 3893 | free_misc (marker); | ||
| 3894 | } | ||
| 3895 | |||
| 3896 | 3887 | ||
| 3897 | /* Return a newly created vector or string with specified arguments as | 3888 | /* Return a newly created vector or string with specified arguments as |
| 3898 | elements. If all the arguments are characters that can fit | 3889 | elements. If all the arguments are characters that can fit |