mtime = time_error_value (save_errno);
st.st_size = -1;
if (!NILP (Vcoding_system_for_read))
- Fset (Qbuffer_file_coding_system, Vcoding_system_for_read);
+ {
+ CHECK_CODING_SYSTEM (Vcoding_system_for_read);
+ Fset (Qbuffer_file_coding_system, Vcoding_system_for_read);
+ }
goto notfound;
}
else if (!NILP (Vcoding_system_for_write))
{
val = Vcoding_system_for_write;
+ CHECK_CODING_SYSTEM (val);
if (coding_system_require_warning
&& !NILP (Ffboundp (Vselect_safe_coding_system_function)))
/* Confirm that VAL can surely encode the current region. */
using_default_coding = 1;
}
+ if (!NILP (val))
+ CHECK_CODING_SYSTEM (val);
+
if (! NILP (val) && ! force_raw_text)
{
Lisp_Object spec, attrs;