X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fsyntax.c;h=2b3ebf8a27c9694f9d4b04ae1d7c36a7305a0cb8;hp=db3faba2b4185b37f42e7ac04f6d46ff57611ea6;hb=f7019bf646d0d4e750e0186d6e912ec7a3b9da90;hpb=1bbdeb3a4ec887b8a6bcacb0384a978cc3b1f6f5 diff --git a/src/syntax.c b/src/syntax.c index db3faba..2b3ebf8 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -1,6 +1,7 @@ /* XEmacs routines to deal with syntax tables; also word and list parsing. Copyright (C) 1985-1994 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. + Copyright (C) 2001 MORIOKA Tomohiko This file is part of XEmacs. @@ -232,7 +233,9 @@ BUFFER defaults to the current buffer if omitted. struct buffer *buf = decode_buffer (buffer, 0); syntax_table = check_syntax_table (syntax_table, Qnil); buf->syntax_table = syntax_table; +#ifndef UTF2000 buf->mirror_syntax_table = XCHAR_TABLE (syntax_table)->mirror_table; +#endif /* Indicate that this buffer now has a specified syntax table. */ buf->local_var_flags |= XINT (buffer_local_flags.syntax_table); return syntax_table; @@ -413,15 +416,19 @@ update_syntax_cache (int pos, int count) else { tmp_table = Qnil; /* silence compiler */ - /* Always aborts. #### Is there another sensible thing to do here? */ + /* Always ABORTs. #### Is there another sensible thing to do here? */ assert (BUFFERP (syntax_cache.object) || STRINGP (syntax_cache.object)); } if (EQ (Fsyntax_table_p (tmp_table), Qt)) { syntax_cache.use_code = 0; +#ifdef UTF2000 + syntax_cache.current_syntax_table = tmp_table; +#else syntax_cache.current_syntax_table = XCHAR_TABLE (tmp_table)->mirror_table; +#endif } else if (CONSP (tmp_table) && INTP (XCAR (tmp_table))) { @@ -431,8 +438,13 @@ update_syntax_cache (int pos, int count) else { syntax_cache.use_code = 0; +#ifdef UTF2000 + syntax_cache.current_syntax_table = + syntax_cache.buffer->syntax_table; +#else syntax_cache.current_syntax_table = syntax_cache.buffer->mirror_syntax_table; +#endif } #ifdef SYNTAX_CACHE_STATISTICS @@ -543,7 +555,9 @@ syntax table. */ (character, syntax_table)) { +#ifndef UTF2000 Lisp_Char_Table *mirrortab; +#endif if (NILP (character)) { @@ -551,8 +565,13 @@ syntax table. } CHECK_CHAR_COERCE_INT (character); syntax_table = check_syntax_table (syntax_table, current_buffer->syntax_table); +#ifdef UTF2000 + return make_char (syntax_code_spec[(int) SYNTAX (XCHAR_TABLE(syntax_table), + XCHAR (character))]); +#else mirrortab = XCHAR_TABLE (XCHAR_TABLE (syntax_table)->mirror_table); return make_char (syntax_code_spec[(int) SYNTAX (mirrortab, XCHAR (character))]); +#endif } #ifdef MULE @@ -588,13 +607,19 @@ syntax table. */ (character, syntax_table)) { +#ifndef UTF2000 Lisp_Char_Table *mirrortab; +#endif int code; CHECK_CHAR_COERCE_INT (character); syntax_table = check_syntax_table (syntax_table, current_buffer->syntax_table); +#ifdef UTF2000 + code = SYNTAX (XCHAR_TABLE (syntax_table), XCHAR (character)); +#else mirrortab = XCHAR_TABLE (XCHAR_TABLE (syntax_table)->mirror_table); code = SYNTAX (mirrortab, XCHAR (character)); +#endif if (code == Sopen || code == Sclose || code == Sstring) return syntax_match (syntax_table, XCHAR (character)); return Qnil; @@ -1698,8 +1723,12 @@ Optional arg BUFFER defaults to the current buffer. Bufpos beg = BUF_BEGV (buf); Bufpos pos = BUF_PT (buf); #ifndef emacs +#ifdef UTF2000 + Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->syntax_table); +#else Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table); #endif +#endif Emchar c = '\0'; /* initialize to avoid compiler warnings */ @@ -2187,6 +2216,7 @@ cmst_mapfun (struct chartab_range *range, Lisp_Object val, void *arg) return 0; } +#ifndef UTF2000 static void update_just_this_syntax_table (Lisp_Char_Table *ct) { @@ -2221,6 +2251,7 @@ update_syntax_table (Lisp_Char_Table *ct) else update_just_this_syntax_table (ct); } +#endif /************************************************************************/