comparison src/syntax.h @ 272:c5d627a313b1 r21-0b34

Import from CVS: tag r21-0b34
author cvs
date Mon, 13 Aug 2007 10:28:48 +0200
parents 131b0175ea99
children 8e84bee8ddd0
comparison
equal deleted inserted replaced
271:c7b7086b0a39 272:c5d627a313b1
22 22
23 #ifndef _XEMACS_SYNTAX_H_ 23 #ifndef _XEMACS_SYNTAX_H_
24 #define _XEMACS_SYNTAX_H_ 24 #define _XEMACS_SYNTAX_H_
25 25
26 #include "chartab.h" 26 #include "chartab.h"
27
28 /* The standard syntax table is stored where it will automatically
29 be used in all new buffers. */
30 extern Lisp_Object Vstandard_syntax_table;
31 27
32 /* A syntax table is a type of char table. 28 /* A syntax table is a type of char table.
33 29
34 The low 7 bits of the integer is a code, as follows. The 8th bit is 30 The low 7 bits of the integer is a code, as follows. The 8th bit is
35 used as the prefix bit flag (see below). 31 used as the prefix bit flag (see below).
66 Sendcomment, /* a comment-ending character */ 62 Sendcomment, /* a comment-ending character */
67 Sinherit, /* use the standard syntax table for this character */ 63 Sinherit, /* use the standard syntax table for this character */
68 Smax /* Upper bound on codes that are meaningful */ 64 Smax /* Upper bound on codes that are meaningful */
69 }; 65 };
70 66
71 extern Lisp_Object Qsyntax_table_p;
72 Lisp_Object Fsyntax_table_p (Lisp_Object);
73 Lisp_Object Fsyntax_table (Lisp_Object);
74 Lisp_Object Fset_syntax_table (Lisp_Object, Lisp_Object);
75 enum syntaxcode charset_syntax (struct buffer *buf, Lisp_Object charset, 67 enum syntaxcode charset_syntax (struct buffer *buf, Lisp_Object charset,
76 int *multi_p_out); 68 int *multi_p_out);
77 69
78 /* Return the syntax code for a particular character and mirror table. */ 70 /* Return the syntax code for a particular character and mirror table. */
79 71
84 INLINE int 76 INLINE int
85 SYNTAX_CODE (struct Lisp_Char_Table *table, Emchar c) 77 SYNTAX_CODE (struct Lisp_Char_Table *table, Emchar c)
86 { 78 {
87 return SYNTAX_CODE_UNSAFE (table, c); 79 return SYNTAX_CODE_UNSAFE (table, c);
88 } 80 }
89 81
90 #define SYNTAX_UNSAFE(table, c) \ 82 #define SYNTAX_UNSAFE(table, c) \
91 ((enum syntaxcode) (SYNTAX_CODE_UNSAFE (table, c) & 0177)) 83 ((enum syntaxcode) (SYNTAX_CODE_UNSAFE (table, c) & 0177))
92 84
93 #define SYNTAX_FROM_CODE(code) ((enum syntaxcode) ((code) & 0177)) 85 #define SYNTAX_FROM_CODE(code) ((enum syntaxcode) ((code) & 0177))
94 #define SYNTAX(table, c) SYNTAX_FROM_CODE (SYNTAX_CODE (table, c)) 86 #define SYNTAX(table, c) SYNTAX_FROM_CODE (SYNTAX_CODE (table, c))
228 ? SYNTAX_COMMENT_STYLE_A \ 220 ? SYNTAX_COMMENT_STYLE_A \
229 : (STYLE_FOUND_1CHAR_P (table, a, SYNTAX_COMMENT_STYLE_B) \ 221 : (STYLE_FOUND_1CHAR_P (table, a, SYNTAX_COMMENT_STYLE_B) \
230 ? SYNTAX_COMMENT_STYLE_B \ 222 ? SYNTAX_COMMENT_STYLE_B \
231 : 0))) 223 : 0)))
232 224
225 EXFUN (Fchar_syntax, 2);
226 EXFUN (Fforward_word, 2);
227
228 /* The standard syntax table is stored where it will automatically
229 be used in all new buffers. */
230 extern Lisp_Object Vstandard_syntax_table;
231
233 /* This array, indexed by a character, contains the syntax code which 232 /* This array, indexed by a character, contains the syntax code which
234 that character signifies (as a char). 233 that character signifies (as a char).
235 For example, (enum syntaxcode) syntax_spec_code['w'] is Sword. */ 234 For example, (enum syntaxcode) syntax_spec_code['w'] is Sword. */
236 235
237 extern CONST unsigned char syntax_spec_code[0400]; 236 extern CONST unsigned char syntax_spec_code[0400];