simplify_char_spec (Lisp_Object char_spec)
{
if (CHARP (char_spec))
- return char_spec;
+ {
+ Lisp_Object ccs;
+ int code_point = ENCODE_CHAR (XCHAR (char_spec), ccs);
+
+ if (code_point >= 0)
+ {
+ int cid = decode_defined_char (ccs, code_point, Qnil);
+
+ if (cid >= 0)
+ return make_char (cid);
+ }
+ return char_spec;
+ }
else if (INTP (char_spec))
return Fdecode_char (Qmap_ucs, char_spec, Qnil, Qnil);
else
{
Lisp_Object ret = Ffind_char (char_spec);
-
+
if (CHARP (ret))
return ret;
else