master 90de836831c: Unbind specpdl when leaving replace-region-contents (bug#81169)

Pip Cet via Mailing list for Emacs changes <[email protected]>
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: master
commit 90de836831c032000968bd36f353640bd115e67f
Author: Pip Cet <[email protected]>
Commit: Pip Cet <[email protected]>

    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.
---
 src/editfns.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/editfns.c b/src/editfns.c
index 191ea0d9053..10980c96aa1 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.