diff options
| author | Stefan Monnier | 2001-10-12 01:37:49 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2001-10-12 01:37:49 +0000 |
| commit | 4948e1f227daae7d3541a6f1d9cd4d3dd4b4487b (patch) | |
| tree | 884cc0316353d04229f5d5712e2964cfc587f24c /src | |
| parent | 33a425c45d095f6683f6f2b35eea5297d4add8e2 (diff) | |
| download | emacs-4948e1f227daae7d3541a6f1d9cd4d3dd4b4487b.tar.gz emacs-4948e1f227daae7d3541a6f1d9cd4d3dd4b4487b.zip | |
(struct gl_state_s): Change the meaning of b_property.
Remove left_ok and right_ok.
(UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE)
(SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT): Update to the
new meaning of b_property.
Diffstat (limited to 'src')
| -rw-r--r-- | src/syntax.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/syntax.h b/src/syntax.h index 5036c4a2a16..41f6662ddeb 100644 --- a/src/syntax.h +++ b/src/syntax.h | |||
| @@ -252,7 +252,7 @@ extern char syntax_code_spec[16]; | |||
| 252 | 252 | ||
| 253 | #define UPDATE_SYNTAX_TABLE_BACKWARD(charpos) \ | 253 | #define UPDATE_SYNTAX_TABLE_BACKWARD(charpos) \ |
| 254 | (parse_sexp_lookup_properties \ | 254 | (parse_sexp_lookup_properties \ |
| 255 | && (charpos) <= gl_state.b_property \ | 255 | && (charpos) < gl_state.b_property \ |
| 256 | ? (update_syntax_table ((charpos) + gl_state.offset, -1, 0, \ | 256 | ? (update_syntax_table ((charpos) + gl_state.offset, -1, 0, \ |
| 257 | gl_state.object), \ | 257 | gl_state.object), \ |
| 258 | 1) \ | 258 | 1) \ |
| @@ -262,7 +262,7 @@ extern char syntax_code_spec[16]; | |||
| 262 | 262 | ||
| 263 | #define UPDATE_SYNTAX_TABLE(charpos) \ | 263 | #define UPDATE_SYNTAX_TABLE(charpos) \ |
| 264 | (parse_sexp_lookup_properties \ | 264 | (parse_sexp_lookup_properties \ |
| 265 | && (charpos) <= gl_state.b_property \ | 265 | && (charpos) < gl_state.b_property \ |
| 266 | ? (update_syntax_table ((charpos) + gl_state.offset, -1, 0, \ | 266 | ? (update_syntax_table ((charpos) + gl_state.offset, -1, 0, \ |
| 267 | gl_state.object), \ | 267 | gl_state.object), \ |
| 268 | 1) \ | 268 | 1) \ |
| @@ -284,7 +284,7 @@ extern char syntax_code_spec[16]; | |||
| 284 | #define SETUP_SYNTAX_TABLE(FROM, COUNT) \ | 284 | #define SETUP_SYNTAX_TABLE(FROM, COUNT) \ |
| 285 | if (1) \ | 285 | if (1) \ |
| 286 | { \ | 286 | { \ |
| 287 | gl_state.b_property = BEGV - 1; \ | 287 | gl_state.b_property = BEGV; \ |
| 288 | gl_state.e_property = ZV + 1; \ | 288 | gl_state.e_property = ZV + 1; \ |
| 289 | gl_state.object = Qnil; \ | 289 | gl_state.object = Qnil; \ |
| 290 | gl_state.use_global = 0; \ | 290 | gl_state.use_global = 0; \ |
| @@ -311,25 +311,25 @@ if (1) \ | |||
| 311 | if (BUFFERP (gl_state.object)) \ | 311 | if (BUFFERP (gl_state.object)) \ |
| 312 | { \ | 312 | { \ |
| 313 | struct buffer *buf = XBUFFER (gl_state.object); \ | 313 | struct buffer *buf = XBUFFER (gl_state.object); \ |
| 314 | gl_state.b_property = 0; \ | 314 | gl_state.b_property = 1; \ |
| 315 | gl_state.e_property = BUF_ZV (buf) - BUF_BEGV (buf) + 1; \ | 315 | gl_state.e_property = BUF_ZV (buf) - BUF_BEGV (buf) + 1; \ |
| 316 | gl_state.offset = BUF_BEGV (buf) - 1; \ | 316 | gl_state.offset = BUF_BEGV (buf) - 1; \ |
| 317 | } \ | 317 | } \ |
| 318 | else if (NILP (gl_state.object)) \ | 318 | else if (NILP (gl_state.object)) \ |
| 319 | { \ | 319 | { \ |
| 320 | gl_state.b_property = 0; \ | 320 | gl_state.b_property = 1; \ |
| 321 | gl_state.e_property = ZV - BEGV + 1; \ | 321 | gl_state.e_property = ZV - BEGV + 1; \ |
| 322 | gl_state.offset = BEGV - 1; \ | 322 | gl_state.offset = BEGV - 1; \ |
| 323 | } \ | 323 | } \ |
| 324 | else if (EQ (gl_state.object, Qt)) \ | 324 | else if (EQ (gl_state.object, Qt)) \ |
| 325 | { \ | 325 | { \ |
| 326 | gl_state.b_property = - 1; \ | 326 | gl_state.b_property = 0; \ |
| 327 | gl_state.e_property = 1500000000; \ | 327 | gl_state.e_property = 1500000000; \ |
| 328 | gl_state.offset = 0; \ | 328 | gl_state.offset = 0; \ |
| 329 | } \ | 329 | } \ |
| 330 | else \ | 330 | else \ |
| 331 | { \ | 331 | { \ |
| 332 | gl_state.b_property = -1; \ | 332 | gl_state.b_property = 0; \ |
| 333 | gl_state.e_property = 1 + XSTRING (gl_state.object)->size; \ | 333 | gl_state.e_property = 1 + XSTRING (gl_state.object)->size; \ |
| 334 | gl_state.offset = 0; \ | 334 | gl_state.offset = 0; \ |
| 335 | } \ | 335 | } \ |
| @@ -352,8 +352,7 @@ struct gl_state_s | |||
| 352 | Lisp_Object global_code; /* Syntax code of current char. */ | 352 | Lisp_Object global_code; /* Syntax code of current char. */ |
| 353 | Lisp_Object current_syntax_table; /* Syntax table for current pos. */ | 353 | Lisp_Object current_syntax_table; /* Syntax table for current pos. */ |
| 354 | Lisp_Object old_prop; /* Syntax-table prop at prev pos. */ | 354 | Lisp_Object old_prop; /* Syntax-table prop at prev pos. */ |
| 355 | int b_property; /* Last index where c_s_t is | 355 | int b_property; /* First index where c_s_t is valid. */ |
| 356 | not valid. */ | ||
| 357 | int e_property; /* First index where c_s_t is | 356 | int e_property; /* First index where c_s_t is |
| 358 | not valid. */ | 357 | not valid. */ |
| 359 | INTERVAL forward_i; /* Where to start lookup on forward */ | 358 | INTERVAL forward_i; /* Where to start lookup on forward */ |
| @@ -365,8 +364,6 @@ struct gl_state_s | |||
| 365 | on: */ | 364 | on: */ |
| 366 | /* Offset for positions specified to UPDATE_SYNTAX_TABLE. */ | 365 | /* Offset for positions specified to UPDATE_SYNTAX_TABLE. */ |
| 367 | int offset; | 366 | int offset; |
| 368 | char left_ok; | ||
| 369 | char right_ok; | ||
| 370 | }; | 367 | }; |
| 371 | 368 | ||
| 372 | extern struct gl_state_s gl_state; | 369 | extern struct gl_state_s gl_state; |