aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax.h')
-rw-r--r--src/syntax.h57
1 files changed, 5 insertions, 52 deletions
diff --git a/src/syntax.h b/src/syntax.h
index ec8fab0166c..48146572d19 100644
--- a/src/syntax.h
+++ b/src/syntax.h
@@ -19,7 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20 20
21extern Lisp_Object Qsyntax_table_p; 21extern Lisp_Object Qsyntax_table_p;
22extern void update_syntax_table P_ ((int, int, int, Lisp_Object)); 22extern void update_syntax_table (int, int, int, Lisp_Object);
23 23
24/* The standard syntax table is stored where it will automatically 24/* The standard syntax table is stored where it will automatically
25 be used in all new buffers. */ 25 be used in all new buffers. */
@@ -128,56 +128,9 @@ extern Lisp_Object syntax_temp;
128 : Qnil)) 128 : Qnil))
129#endif 129#endif
130 130
131/* Then there are seven single-bit flags that have the following meanings:
132 1. This character is the first of a two-character comment-start sequence.
133 2. This character is the second of a two-character comment-start sequence.
134 3. This character is the first of a two-character comment-end sequence.
135 4. This character is the second of a two-character comment-end sequence.
136 5. This character is a prefix, for backward-prefix-chars.
137 6. see below
138 7. This character is part of a nestable comment sequence.
139 Note that any two-character sequence whose first character has flag 1
140 and whose second character has flag 2 will be interpreted as a comment start.
141 131
142 bit 6 is used to discriminate between two different comment styles. 132/* Whether the syntax of the character C has the prefix flag set. */
143 Languages such as C++ allow two orthogonal syntax start/end pairs 133extern int syntax_prefix_flag_p (int c);
144 and bit 6 is used to determine whether a comment-end or Scommentend
145 ends style a or b. Comment start sequences can start style a or b.
146 Style a is always the default.
147 */
148
149/* These macros extract a particular flag for a given character. */
150
151#define SYNTAX_COMSTART_FIRST(c) ((SYNTAX_WITH_FLAGS (c) >> 16) & 1)
152
153#define SYNTAX_COMSTART_SECOND(c) ((SYNTAX_WITH_FLAGS (c) >> 17) & 1)
154
155#define SYNTAX_COMEND_FIRST(c) ((SYNTAX_WITH_FLAGS (c) >> 18) & 1)
156
157#define SYNTAX_COMEND_SECOND(c) ((SYNTAX_WITH_FLAGS (c) >> 19) & 1)
158
159#define SYNTAX_PREFIX(c) ((SYNTAX_WITH_FLAGS (c) >> 20) & 1)
160
161#define SYNTAX_COMMENT_STYLE(c) ((SYNTAX_WITH_FLAGS (c) >> 21) & 1)
162
163#define SYNTAX_COMMENT_NESTED(c) ((SYNTAX_WITH_FLAGS (c) >> 22) & 1)
164
165/* These macros extract specific flags from an integer
166 that holds the syntax code and the flags. */
167
168#define SYNTAX_FLAGS_COMSTART_FIRST(flags) (((flags) >> 16) & 1)
169
170#define SYNTAX_FLAGS_COMSTART_SECOND(flags) (((flags) >> 17) & 1)
171
172#define SYNTAX_FLAGS_COMEND_FIRST(flags) (((flags) >> 18) & 1)
173
174#define SYNTAX_FLAGS_COMEND_SECOND(flags) (((flags) >> 19) & 1)
175
176#define SYNTAX_FLAGS_PREFIX(flags) (((flags) >> 20) & 1)
177
178#define SYNTAX_FLAGS_COMMENT_STYLE(flags) (((flags) >> 21) & 1)
179
180#define SYNTAX_FLAGS_COMMENT_NESTED(flags) (((flags) >> 22) & 1)
181 134
182/* This array, indexed by a character, contains the syntax code which that 135/* This array, indexed by a character, contains the syntax code which that
183 character signifies (as a char). For example, 136 character signifies (as a char). For example,
@@ -346,9 +299,9 @@ struct gl_state_s
346 299
347extern struct gl_state_s gl_state; 300extern struct gl_state_s gl_state;
348extern int parse_sexp_lookup_properties; 301extern int parse_sexp_lookup_properties;
349extern INTERVAL interval_of P_ ((int, Lisp_Object)); 302extern INTERVAL interval_of (int, Lisp_Object);
350 303
351extern int scan_words P_ ((int, int)); 304extern int scan_words (int, int);
352 305
353/* arch-tag: 28833cca-cd73-4741-8c85-a3111166a0e0 306/* arch-tag: 28833cca-cd73-4741-8c85-a3111166a0e0
354 (do not change this comment) */ 307 (do not change this comment) */