Mercurial > hg > xemacs-beta
comparison src/syntax.h @ 5118:e0db3c197671 ben-lisp-object
merge up to latest default branch, doesn't compile yet
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 26 Dec 2009 21:18:49 -0600 |
parents | b03fc4eae965 |
children | d1247f3cc363 |
comparison
equal
deleted
inserted
replaced
5117:3742ea8250b5 | 5118:e0db3c197671 |
---|---|
147 | 147 |
148 In a 64-bit integer, there would be 32 more unused bits between | 148 In a 64-bit integer, there would be 32 more unused bits between |
149 the tag and the comment bits. | 149 the tag and the comment bits. |
150 | 150 |
151 Clearly, such a scheme will not work for Mule, because the matching | 151 Clearly, such a scheme will not work for Mule, because the matching |
152 paren could be any character and as such requires 19 bits, which | 152 paren could be any character and as such requires 21 bits, which |
153 we don't got. | 153 we don't got. |
154 | 154 |
155 Remember that under Mule we use char tables instead of vectors. | 155 Remember that under Mule we use char tables instead of vectors. |
156 So what we do is use another char table for the matching paren | 156 So what we do is use another char table for the matching paren |
157 and store a pointer to it in the first char table. (This frees | 157 and store a pointer to it in the first char table. (This frees |
293 syntax-table property changes (i.e. not every position), and when we do | 293 syntax-table property changes (i.e. not every position), and when we do |
294 need to recalculate, we can update the info from the previous info | 294 need to recalculate, we can update the info from the previous info |
295 faster than if we did the whole calculation from scratch. */ | 295 faster than if we did the whole calculation from scratch. */ |
296 struct syntax_cache | 296 struct syntax_cache |
297 { | 297 { |
298 #ifdef NEW_GC | |
299 struct lrecord_header header; | |
300 #endif /* NEW_GC */ | |
298 int use_code; /* Whether to use syntax_code or | 301 int use_code; /* Whether to use syntax_code or |
299 syntax_table. This is set | 302 syntax_table. This is set |
300 depending on whether the | 303 depending on whether the |
301 syntax-table property is a | 304 syntax-table property is a |
302 syntax table or a syntax | 305 syntax table or a syntax |
331 change. */ | 334 change. */ |
332 Charxpos prev_change; /* Position of the previous extent | 335 Charxpos prev_change; /* Position of the previous extent |
333 change. */ | 336 change. */ |
334 }; | 337 }; |
335 | 338 |
339 #ifdef NEW_GC | |
340 typedef struct syntax_cache Lisp_Syntax_Cache; | |
341 | |
342 DECLARE_LISP_OBJECT (syntax_cache, Lisp_Syntax_Cache); | |
343 | |
344 #define XSYNTAX_CACHE(x) \ | |
345 XRECORD (x, syntax_cache, Lisp_Syntax_Cache) | |
346 #define wrap_syntax_cache(p) wrap_record (p, syntax_cache) | |
347 #define SYNTAX_CACHE_P(x) RECORDP (x, syntax_cache) | |
348 #define CHECK_SYNTAX_CACHE(x) CHECK_RECORD (x, syntax_cache) | |
349 #define CONCHECK_SYNTAX_CACHE(x) CONCHECK_RECORD (x, syntax_cache) | |
350 #endif /* NEW_GC */ | |
351 | |
352 | |
353 | |
336 extern const struct sized_memory_description syntax_cache_description; | 354 extern const struct sized_memory_description syntax_cache_description; |
337 | 355 |
338 /* Note that the external interface to the syntax-cache uses charpos's, but | 356 /* Note that the external interface to the syntax-cache uses charpos's, but |
339 intnernally we use bytepos's, for speed. */ | 357 internally we use bytepos's, for speed. */ |
340 | 358 |
341 void update_syntax_cache (struct syntax_cache *cache, Charxpos pos, int count); | 359 void update_syntax_cache (struct syntax_cache *cache, Charxpos pos, int count); |
342 struct syntax_cache *setup_syntax_cache (struct syntax_cache *cache, | 360 struct syntax_cache *setup_syntax_cache (struct syntax_cache *cache, |
343 Lisp_Object object, | 361 Lisp_Object object, |
344 struct buffer *buffer, | 362 struct buffer *buffer, |