Function: coding-system-put
coding-system-put is a function defined in coding.c.
Signature
(coding-system-put CODING-SYSTEM PROP VAL)
Documentation
Change value in CODING-SYSTEM's property list PROP to VAL.
Probably introduced at or before Emacs version 20.3.
Source Code
// Defined in /usr/src/emacs/src/coding.c
{
Lisp_Object spec, attrs;
CHECK_CODING_SYSTEM_GET_SPEC (coding_system, spec);
attrs = AREF (spec, 0);
if (EQ (prop, QCmnemonic))
{
/* decode_mode_spec_coding assumes the mnemonic is a single character. */
if (STRINGP (val))
val = make_fixnum (STRING_CHAR (SDATA (val)));
else
CHECK_CHARACTER (val);
ASET (attrs, coding_attr_mnemonic, val);
}
else if (EQ (prop, QCdefault_char))
{
if (NILP (val))
val = make_fixnum (' ');
else
CHECK_CHARACTER (val);
ASET (attrs, coding_attr_default_char, val);
}
else if (EQ (prop, QCdecode_translation_table))
{
if (! CHAR_TABLE_P (val) && ! CONSP (val))
CHECK_SYMBOL (val);
ASET (attrs, coding_attr_decode_tbl, val);
}
else if (EQ (prop, QCencode_translation_table))
{
if (! CHAR_TABLE_P (val) && ! CONSP (val))
CHECK_SYMBOL (val);
ASET (attrs, coding_attr_encode_tbl, val);
}
else if (EQ (prop, QCpost_read_conversion))
{
CHECK_SYMBOL (val);
ASET (attrs, coding_attr_post_read, val);
}
else if (EQ (prop, QCpre_write_conversion))
{
CHECK_SYMBOL (val);
ASET (attrs, coding_attr_pre_write, val);
}
else if (EQ (prop, QCascii_compatible_p))
{
ASET (attrs, coding_attr_ascii_compat, val);
}
ASET (attrs, coding_attr_plist,
Fplist_put (CODING_ATTR_PLIST (attrs), prop, val));
return val;
}