(SYNTAX_ENTRY_INT): For a composite character, check
authorKenichi Handa <handa@m17n.org>
Mon, 16 Nov 1998 01:17:06 +0000 (01:17 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 16 Nov 1998 01:17:06 +0000 (01:17 +0000)
the first component.

src/syntax.h

index 4b58b5d..010f063 100644 (file)
@@ -105,11 +105,14 @@ extern Lisp_Object syntax_parent_lookup P_ ((Lisp_Object, int));
 #  define CURRENT_SYNTAX_TABLE current_buffer->syntax_table
 #endif
 
-#define SYNTAX_ENTRY_INT(c)                                            \
+#define SYNTAX_ENTRY_INT(c)                                    \
   ((c) < CHAR_TABLE_SINGLE_BYTE_SLOTS                          \
-   ? SYNTAX_ENTRY_FOLLOW_PARENT (CURRENT_SYNTAX_TABLE, \
+   ? SYNTAX_ENTRY_FOLLOW_PARENT (CURRENT_SYNTAX_TABLE,         \
                                 (unsigned char) (c))           \
-   : Faref (CURRENT_SYNTAX_TABLE, make_number ((c))))
+   : Faref (CURRENT_SYNTAX_TABLE,                              \
+           make_number (COMPOSITE_CHAR_P (c)                   \
+                        ? cmpchar_component ((c), 0, 1)        \
+                        : (c))))
 
 /* Extract the information from the entry for character C
    in the current syntax table.  */