if (NILP (coding_system))
coding_system = Qraw_text;
- CHECK_CODING_SYSTEM (coding_system);
+ else
+ CHECK_CODING_SYSTEM (coding_system);
spec = CODING_SYSTEM_SPEC (coding_system);
eol_type = AREF (spec, 2);
if (VECTORP (eol_type))
coding_system = CDR_SAFE (Vdefault_process_coding_system);
else if (i == 2)
coding_system = preferred_coding_system ();
+ CHECK_CODING_SYSTEM (coding_system);
spec = CODING_SYSTEM_SPEC (coding_system);
if (NILP (spec))
continue;
mtime = time_error_value (save_errno);
st.st_size = -1;
if (!NILP (Vcoding_system_for_read))
- {
- CHECK_CODING_SYSTEM (Vcoding_system_for_read);
- Fset (Qbuffer_file_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;
+ CHECK_CODING_SYSTEM (val);
CHECK_CODING_SYSTEM_GET_SPEC (val, spec);
attrs = AREF (spec, 0);
if (EQ (CODING_ATTR_TYPE (attrs), Qraw_text))
if (!force_raw_text
&& !NILP (Ffboundp (Vselect_safe_coding_system_function)))
- {
- /* Confirm that VAL can surely encode the current region. */
- val = call5 (Vselect_safe_coding_system_function,
- start, end, val, Qnil, filename);
- CHECK_CODING_SYSTEM (val);
- }
+ /* Confirm that VAL can surely encode the current region. */
+ val = call5 (Vselect_safe_coding_system_function,
+ start, end, val, Qnil, filename);
/* If the decided coding-system doesn't specify end-of-line
format, we use that of
Lisp_Object dflt = BVAR (&buffer_defaults, buffer_file_coding_system);
if (! NILP (dflt))
- {
- CHECK_CODING_SYSTEM (dflt);
- val = (coding_inherit_eol_type (val, dflt));
- }
+ val = coding_inherit_eol_type (val, dflt);
}
/* If we decide not to encode text, use `raw-text' or one of its