XEmacs 21.2.32 "Kastor & Polydeukes".
[chise/xemacs-chise.git.1] / src / syntax.h
index deb98e3..d94fc04 100644 (file)
@@ -72,8 +72,8 @@ enum syntaxcode charset_syntax (struct buffer *buf, Lisp_Object charset,
 #define SYNTAX_CODE_UNSAFE(table, c) \
    XINT (CHAR_TABLE_VALUE_UNSAFE (table, c))
 
-INLINE int SYNTAX_CODE (Lisp_Char_Table *table, Emchar c);
-INLINE int
+INLINE_HEADER int SYNTAX_CODE (Lisp_Char_Table *table, Emchar c);
+INLINE_HEADER int
 SYNTAX_CODE (Lisp_Char_Table *table, Emchar c)
 {
   return SYNTAX_CODE_UNSAFE (table, c);
@@ -85,8 +85,8 @@ SYNTAX_CODE (Lisp_Char_Table *table, Emchar c)
 #define SYNTAX_FROM_CODE(code) ((enum syntaxcode) ((code) & 0177))
 #define SYNTAX(table, c) SYNTAX_FROM_CODE (SYNTAX_CODE (table, c))
 
-INLINE int WORD_SYNTAX_P (Lisp_Char_Table *table, Emchar c);
-INLINE int
+INLINE_HEADER int WORD_SYNTAX_P (Lisp_Char_Table *table, Emchar c);
+INLINE_HEADER int
 WORD_SYNTAX_P (Lisp_Char_Table *table, Emchar c)
 {
   return SYNTAX (table, c) == Sword;
@@ -170,13 +170,19 @@ WORD_SYNTAX_P (Lisp_Char_Table *table, Emchar c)
 #define SYNTAX_SECOND_CHAR_END   0x03
 #define SYNTAX_SECOND_CHAR       0x33
 
-#define SYNTAX_START_P(table, a, b)                                    \
-  ((SYNTAX_COMMENT_BITS (table, a) & SYNTAX_FIRST_CHAR_START)          \
-   && (SYNTAX_COMMENT_BITS (table, b) & SYNTAX_SECOND_CHAR_START))
 
-#define SYNTAX_END_P(table, a, b)                                      \
-  ((SYNTAX_COMMENT_BITS (table, a) & SYNTAX_FIRST_CHAR_END)            \
-   && (SYNTAX_COMMENT_BITS (table, b) & SYNTAX_SECOND_CHAR_END))
+/* #### These are now more or less equivalent to
+   SYNTAX_COMMENT_MATCH_START ...*/
+/* a and b must be first and second start chars for a common type */
+#define SYNTAX_START_P(table, a, b)                                     \
+  (((SYNTAX_COMMENT_BITS (table, a) & SYNTAX_FIRST_CHAR_START) >> 2)    \
+   & (SYNTAX_COMMENT_BITS (table, b) & SYNTAX_SECOND_CHAR_START))
+
+/* ... and  SYNTAX_COMMENT_MATCH_END */
+/* a and b must be first and second end chars for a common type */
+#define SYNTAX_END_P(table, a, b)                                       \
+  (((SYNTAX_COMMENT_BITS (table, a) & SYNTAX_FIRST_CHAR_END) >> 2)      \
+   & (SYNTAX_COMMENT_BITS (table, b) & SYNTAX_SECOND_CHAR_END))
 
 #define SYNTAX_STYLES_MATCH_START_P(table, a, b, mask)                     \
   ((SYNTAX_COMMENT_BITS (table, a) & SYNTAX_FIRST_CHAR_START & (mask))     \
@@ -232,11 +238,11 @@ extern Lisp_Object Vstandard_syntax_table;
    that character signifies (as a char).
    For example, (enum syntaxcode) syntax_spec_code['w'] is Sword. */
 
-extern CONST unsigned char syntax_spec_code[0400];
+extern const unsigned char syntax_spec_code[0400];
 
 /* Indexed by syntax code, give the letter that describes it. */
 
-extern CONST unsigned char syntax_code_spec[];
+extern const unsigned char syntax_code_spec[];
 
 Lisp_Object scan_lists (struct buffer *buf, Bufpos from, int count,
                        int depth, int sexpflag, int no_error);