From: tomo Date: Fri, 23 Aug 2002 17:48:28 +0000 (+0000) Subject: (TRT_TABLE_CHAR_1): New implementation in UTF-2000. X-Git-Tag: r21-2-46-utf-2000-0_19-1~9 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=28fb3e53a6269151cdcfd5384b221cb58eab5910;p=chise%2Fxemacs-chise.git (TRT_TABLE_CHAR_1): New implementation in UTF-2000. (SET_TRT_TABLE_CHAR_1): Likewise. --- diff --git a/src/buffer.h b/src/buffer.h index 2fffa70..b9853b6 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -1378,14 +1378,42 @@ INLINE_HEADER Emchar TRT_TABLE_CHAR_1 (Lisp_Object table, Emchar ch) { Lisp_Object TRT_char; - TRT_char = get_char_table (ch, XCHAR_TABLE (table)); +#ifdef UTF2000 + if (CHAR_TABLEP (table)) + TRT_char = get_char_table (ch, XCHAR_TABLE (table)); + else + { + TRT_char = Fget_char_attribute (make_char (ch), table, Qnil); + if (CONSP (TRT_char)) + { + TRT_char = XCAR (TRT_char); + if (CONSP (TRT_char)) + TRT_char = Ffind_char (TRT_char); + } + } +#else + TRT_char = get_char_table (ch, XCHAR_TABLE (table)); +#endif if (NILP (TRT_char)) return ch; else return XCHAR (TRT_char); } +#ifdef UTF2000 +INLINE_HEADER Lisp_Object +SET_TRT_TABLE_CHAR_1 (Lisp_Object table, Emchar ch1, Emchar ch2); +INLINE_HEADER Lisp_Object +SET_TRT_TABLE_CHAR_1 (Lisp_Object table, Emchar ch1, Emchar ch2) +{ + if (CHAR_TABLEP (table)) + return Fput_char_table (make_char (ch1), make_char (ch2), table); + else + return Fput_char_attribute (make_char (ch1), table, make_char (ch2)); +} +#else #define SET_TRT_TABLE_CHAR_1(table, ch1, ch2) \ Fput_char_table (make_char (ch1), make_char (ch2), table); +#endif INLINE_HEADER Emchar TRT_TABLE_OF (Lisp_Object trt, Emchar c); INLINE_HEADER Emchar