changeset 88390:ee2122ab4d5b

(SET_RAW_SYNTAX_ENTRY): Call CHAR_TABLE_SET. (SYNTAX_ENTRY_FOLLOW_PARENT): Macro deleted. (SET_RAW_SYNTAX_ENTRY_RANGE): New macro. (SYNTAX_ENTRY_INT): Call CHAR_TABLE_REF.
author Kenichi Handa <handa@m17n.org>
date Fri, 01 Mar 2002 01:48:16 +0000
parents 39b2b971cdb3
children 1953d0d56cd7
files src/syntax.h
diffstat 1 files changed, 8 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/src/syntax.h	Fri Mar 01 01:47:11 2002 +0000
+++ b/src/syntax.h	Fri Mar 01 01:48:16 2002 +0000
@@ -57,37 +57,14 @@
 
 /* Set the syntax entry VAL for char C in table TABLE.  */
 
-#define SET_RAW_SYNTAX_ENTRY(table, c, val)				\
-  ((c) < CHAR_TABLE_SINGLE_BYTE_SLOTS					\
-   ? (XCHAR_TABLE (table)->contents[(unsigned char) (c)] = (val))	\
-   : Faset ((table), make_number (c), (val)))
-
-/* Fetch the syntax entry for char C in syntax table TABLE.
-   This macro is called only when C is less than CHAR_TABLE_ORDINARY_SLOTS.
-   Do inheritance.  */
+#define SET_RAW_SYNTAX_ENTRY(table, c, val)	\
+  CHAR_TABLE_SET ((table), make_number (c), (val))
 
-#ifdef __GNUC__
-#define SYNTAX_ENTRY_FOLLOW_PARENT(table, c)			\
-  ({ Lisp_Object tbl = table;					\
-     Lisp_Object temp = XCHAR_TABLE (tbl)->contents[(c)];	\
-     while (NILP (temp))					\
-       {							\
-	 tbl = XCHAR_TABLE (tbl)->parent;			\
-	 if (NILP (tbl))					\
-	   break;						\
-	 temp = XCHAR_TABLE (tbl)->contents[(c)];		\
-       }							\
-     temp; })
-#else
-extern Lisp_Object syntax_temp;
-extern Lisp_Object syntax_parent_lookup P_ ((Lisp_Object, int));
+/* Set the syntax entry VAL for char-range RANGE in table TABLE.
+   RANGE is a cons (FROM . TO) specifying the range of characters.  */
 
-#define SYNTAX_ENTRY_FOLLOW_PARENT(table, c)	    	\
-  (syntax_temp = XCHAR_TABLE (table)->contents[(c)],	\
-   (NILP (syntax_temp)				    	\
-    ? syntax_parent_lookup (table, (c))		    	\
-    : syntax_temp))
-#endif
+#define SET_RAW_SYNTAX_ENTRY_RANGE(table, range, val)	\
+  Fset_char_table_range ((table), (range), (val))
 
 /* SYNTAX_ENTRY fetches the information from the entry for character C
    in syntax table TABLE, or from globally kept data (gl_state).  
@@ -105,12 +82,8 @@
 #  define CURRENT_SYNTAX_TABLE current_buffer->syntax_table
 #endif
 
-#define SYNTAX_ENTRY_INT(c)				\
-  ((c) < CHAR_TABLE_SINGLE_BYTE_SLOTS			\
-   ? SYNTAX_ENTRY_FOLLOW_PARENT (CURRENT_SYNTAX_TABLE,	\
-				 (unsigned char) (c))	\
-   : Faref (CURRENT_SYNTAX_TABLE,			\
-	    make_number (c)))
+#define SYNTAX_ENTRY_INT(c)	\
+  CHAR_TABLE_REF (CURRENT_SYNTAX_TABLE, make_number (c))
 
 /* Extract the information from the entry for character C
    in the current syntax table.  */