X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Ffns.c;h=2455d35fdb4a9f8077690cd39d54011832e930e4;hb=abf386d83354a83eaffe586602a5b5e34a9c6503;hp=156beebcef473955d4af678128ab84ed0896dd36;hpb=c1083e2b4200d5643ae782a6ca4c93831fdccb03;p=chise%2Fxemacs-chise.git- diff --git a/src/fns.c b/src/fns.c index 156beeb..2455d35 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1,7 +1,7 @@ /* Random utility Lisp functions. Copyright (C) 1985, 86, 87, 93, 94, 95 Free Software Foundation, Inc. Copyright (C) 1995, 1996 Ben Wing. - Copyright (C) 2002, 2003 MORIOKA Tomohiko + Copyright (C) 2002, 2003, 2004 MORIOKA Tomohiko This file is part of XEmacs. @@ -3834,7 +3834,40 @@ simplify_char_spec (Lisp_Object char_spec) return Fdecode_char (Qmap_ucs, char_spec, Qnil, Qnil); else { +#if 0 Lisp_Object ret = Ffind_char (char_spec); +#else + Lisp_Object ret; + Lisp_Object rest = char_spec; + int have_ccs = 0; + + while (CONSP (rest)) + { + Lisp_Object cell = Fcar (rest); + Lisp_Object ccs; + +#if 0 + if (!LISTP (cell)) + signal_simple_error ("Invalid argument", char_spec); +#endif + if (!NILP (ccs = Ffind_charset (Fcar (cell)))) + { + cell = Fcdr (cell); + if (CONSP (cell)) + ret = Fmake_char (ccs, Fcar (cell), Fcar (Fcdr (cell))); + else + ret = Fdecode_char (ccs, cell, Qt, Qt); + have_ccs = 1; + if (CHARP (ret)) + return ret; + } + rest = Fcdr (rest); + } + if (have_ccs) + ret = Fdefine_char (char_spec); + else + ret = Qnil; +#endif if (CHARP (ret)) return ret;