> From: yyoncho <yyoncho@gmail.com>
> Date: Sun, 24 Mar 2019 13:37:23 +0200
> Cc: Sébastien Chapuis <sebastien@chapu.is>,
> 31138@debbugs.gnu.org
>
> After code_convert_string_norecord the callstack is the same as the callstack of the JSON parsing (it uses
> the same method to convert/validate the string).
Got it, thanks.
Please try the patch below and see if it solves the problem in both
cases.
diff --git a/src/coding.c b/src/coding.c
index 905c7ce..f9c9dc8 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -7807,10 +7807,14 @@ make_conversion_work_buffer (bool multibyte)
Lisp_Object name, workbuf;
struct buffer *current;
+ current = current_buffer;
if (reused_workbuf_in_use)
{
name = Fgenerate_new_buffer_name (Vcode_conversion_workbuf_name, Qnil);
workbuf = Fget_buffer_create (name);
+ set_buffer_internal (XBUFFER (workbuf));
+ Fset (Fmake_local_variable (Qkill_buffer_query_functions), Qnil);
+ Fset (Fmake_local_variable (Qkill_buffer_hook), Qnil);
}
else
{
@@ -7819,9 +7823,8 @@ make_conversion_work_buffer (bool multibyte)
Vcode_conversion_reused_workbuf
= Fget_buffer_create (Vcode_conversion_workbuf_name);
workbuf = Vcode_conversion_reused_workbuf;
+ set_buffer_internal (XBUFFER (workbuf));
}
- current = current_buffer;
- set_buffer_internal (XBUFFER (workbuf));
/* We can't allow modification hooks to run in the work buffer. For
instance, directory_files_internal assumes that file decoding
doesn't compile new regexps. */