From ba1479d56e7ed200182e975aab8c2219393da1fa Mon Sep 17 00:00:00 2001 From: tomo Date: Sat, 24 Jan 2004 09:33:11 +0000 Subject: [PATCH] (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'. --- src/chartab.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) 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 /* */ ); -- 1.7.10.4