Unbind specpdl when leaving replace-region-contents (bug#81169)

* src/editfns.c (Freplace_region_contents): Call SPECPDL_INDEX before
code_conversion_save adds specpdl entries.
This commit is contained in:
Pip Cet 2026-06-12 16:19:37 +00:00
parent f5cb95423e
commit 90de836831

View file

@ -2065,6 +2065,8 @@ a buffer or a string. But this is deprecated. */)
time_limit = tlim;
}
specpdl_ref count = SPECPDL_INDEX ();
/* The rest of the code is not prepared to handle a string SOURCE. */
if (!b)
{
@ -2077,8 +2079,6 @@ a buffer or a string. But this is deprecated. */)
}
Lisp_Object source_buffer = make_lisp_ptr (b, Lisp_Vectorlike);
specpdl_ref count = SPECPDL_INDEX ();
ptrdiff_t diags = size_a + size_b + 3;
ptrdiff_t bytes_per_diag = 2 * sizeof (ptrdiff_t) + sizeof (int);
ptrdiff_t surplus_char_bytes = 3 * sizeof (int);