From: tomo Date: Sat, 24 Jan 2004 09:33:11 +0000 (+0000) Subject: (Vnext_defined_char_id): New variable. X-Git-Tag: r21-4-14-chise-0_21-19^2~13 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ba1479d56e7ed200182e975aab8c2219393da1fa;p=chise%2Fxemacs-chise.git (Vnext_defined_char_id): New variable. (Fput_char_attribute): Accept characters in `->unified'. (Fdefine_char): Refer and update Vnext_defined_char_id to allocate new characters which are not related with builtin char-id ranges. (vars_of_chartab): Add new variable `next-defined-char-id'. --- diff --git a/src/chartab.c b/src/chartab.c index a341fb5..bf1c526 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -75,6 +75,7 @@ CHISE_DS *default_chise_data_source = NULL; EXFUN (Fchar_refs_simplify_char_specs, 1); extern Lisp_Object Qideographic_structure; +Lisp_Object Vnext_defined_char_id; EXFUN (Fdefine_char, 1); EXFUN (Fmap_char_attribute, 3); @@ -3382,7 +3383,11 @@ Store CHARACTER's ATTRIBUTE with VALUE. while (CONSP (rest)) { - ret = Fdefine_char (XCAR (rest)); + ret = XCAR (rest); + + if (CONSP (ret)) + ret = Fdefine_char (ret); + if (!NILP (ret)) { Fput_char_attribute (ret, Q_unified_from, list1 (character)); @@ -3973,6 +3978,18 @@ Store character's ATTRIBUTES. } rest = Fcdr (rest); } +#if 1 + { + int cid = XINT (Vnext_defined_char_id); + + if (cid <= 0xE00000) + { + character = make_char (cid); + Vnext_defined_char_id = make_int (cid + 1); + goto setup_attributes; + } + } +#else if ( (!NILP (code = Fcdr (Fassq (Qto_ucs, attributes)))) ) { if (!INTP (code)) @@ -3981,6 +3998,7 @@ Store character's ATTRIBUTES. character = make_char (XINT (code) + 0x100000); goto setup_attributes; } +#endif return Qnil; } else if (!INTP (code)) @@ -4486,6 +4504,12 @@ syms_of_chartab (void) void vars_of_chartab (void) { +#ifdef UTF2000 + DEFVAR_LISP ("next-defined-char-id", &Vnext_defined_char_id /* +*/ ); + Vnext_defined_char_id = make_int (0x0F0000); +#endif + #ifdef HAVE_CHISE DEFVAR_LISP ("char-db-stingy-mode", &Vchar_db_stingy_mode /* */ );