summaryrefslogtreecommitdiff
path: root/src/coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/src/coding.c b/src/coding.c
index c6d96436770..e351cc72fab 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -7785,7 +7785,7 @@ encode_coding (struct coding_system *coding)
/* Name (or base name) of work buffer for code conversion. */
-static Lisp_Object Vcode_conversion_workbuf_name;
+Lisp_Object Vcode_conversion_workbuf_name;
/* A working buffer used by the top level conversion. Once it is
created, it is never destroyed. It has the name
@@ -7797,7 +7797,6 @@ static Lisp_Object Vcode_conversion_reused_workbuf;
/* True iff Vcode_conversion_reused_workbuf is already in use. */
static bool reused_workbuf_in_use;
-
static void
code_conversion_restore (Lisp_Object arg)
{
@@ -7810,12 +7809,7 @@ code_conversion_restore (Lisp_Object arg)
if (EQ (workbuf, Vcode_conversion_reused_workbuf))
reused_workbuf_in_use = 0;
else
- {
- ptrdiff_t count = SPECPDL_INDEX ();
- specbind (Qbuffer_list_update_hook, Qnil);
- Fkill_buffer (workbuf);
- unbind_to (count, Qnil);
- }
+ Fkill_buffer (workbuf);
}
set_buffer_internal (XBUFFER (current));
}
@@ -7827,24 +7821,17 @@ code_conversion_save (bool with_work_buf, bool multibyte)
if (with_work_buf)
{
- ptrdiff_t count = SPECPDL_INDEX ();
if (reused_workbuf_in_use)
{
Lisp_Object name
= Fgenerate_new_buffer_name (Vcode_conversion_workbuf_name, Qnil);
- specbind (Qbuffer_list_update_hook, Qnil);
workbuf = Fget_buffer_create (name);
- unbind_to (count, Qnil);
}
else
{
if (NILP (Fbuffer_live_p (Vcode_conversion_reused_workbuf)))
- {
- specbind (Qbuffer_list_update_hook, Qnil);
- Vcode_conversion_reused_workbuf
- = Fget_buffer_create (Vcode_conversion_workbuf_name);
- unbind_to (count, Qnil);
- }
+ Vcode_conversion_reused_workbuf
+ = Fget_buffer_create (Vcode_conversion_workbuf_name);
workbuf = Vcode_conversion_reused_workbuf;
}
}
@@ -7863,11 +7850,6 @@ code_conversion_save (bool with_work_buf, bool multibyte)
bset_enable_multibyte_characters (current_buffer, multibyte ? Qt : Qnil);
if (EQ (workbuf, Vcode_conversion_reused_workbuf))
reused_workbuf_in_use = 1;
- else
- {
- Fset (Fmake_local_variable (Qkill_buffer_query_functions), Qnil);
- Fset (Fmake_local_variable (Qkill_buffer_hook), Qnil);
- }
set_buffer_internal (current);
}