From: tomo Date: Thu, 12 Feb 2004 06:25:26 +0000 (+0000) Subject: (simplify_char_spec): Try to convert builtin chars to defined chars. X-Git-Tag: r21-4-14-chise-0_21-23^2~7 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1083e2b4200d5643ae782a6ca4c93831fdccb03;p=chise%2Fxemacs-chise.git.1 (simplify_char_spec): Try to convert builtin chars to defined chars. --- diff --git a/src/fns.c b/src/fns.c index b513f4c..156beeb 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3817,13 +3817,25 @@ Lisp_Object 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