Mercurial > emacs
comparison src/syntax.c @ 48266:a404c0056619
(scan_sexps_forward): Undo last patch.
Use a more obvious fix: check eob before updating the syntax table.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 12 Nov 2002 20:40:47 +0000 |
parents | 303d917c08c3 |
children | 04d5f3827d9f |
comparison
equal
deleted
inserted
replaced
48265:9883a3b65e3c | 48266:a404c0056619 |
---|---|
2502 | 2502 |
2503 /* Use this macro instead of `from++'. */ | 2503 /* Use this macro instead of `from++'. */ |
2504 #define INC_FROM \ | 2504 #define INC_FROM \ |
2505 do { prev_from = from; \ | 2505 do { prev_from = from; \ |
2506 prev_from_byte = from_byte; \ | 2506 prev_from_byte = from_byte; \ |
2507 UPDATE_SYNTAX_TABLE_FORWARD (prev_from); \ | |
2508 prev_from_syntax \ | 2507 prev_from_syntax \ |
2509 = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte)); \ | 2508 = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte)); \ |
2510 INC_BOTH (from, from_byte); \ | 2509 INC_BOTH (from, from_byte); \ |
2510 if (from < end) \ | |
2511 UPDATE_SYNTAX_TABLE_FORWARD (from); \ | |
2511 } while (0) | 2512 } while (0) |
2512 | 2513 |
2513 immediate_quit = 1; | 2514 immediate_quit = 1; |
2514 QUIT; | 2515 QUIT; |
2515 | 2516 |
2578 curlevel->prev = -1; | 2579 curlevel->prev = -1; |
2579 curlevel->last = -1; | 2580 curlevel->last = -1; |
2580 | 2581 |
2581 SETUP_SYNTAX_TABLE (prev_from, 1); | 2582 SETUP_SYNTAX_TABLE (prev_from, 1); |
2582 prev_from_syntax = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte)); | 2583 prev_from_syntax = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte)); |
2584 UPDATE_SYNTAX_TABLE_FORWARD (from); | |
2583 | 2585 |
2584 /* Enter the loop at a place appropriate for initial state. */ | 2586 /* Enter the loop at a place appropriate for initial state. */ |
2585 | 2587 |
2586 if (state.incomment) | 2588 if (state.incomment) |
2587 goto startincomment; | 2589 goto startincomment; |
2618 code = Scomment; | 2620 code = Scomment; |
2619 } | 2621 } |
2620 else if (from < end) | 2622 else if (from < end) |
2621 if (SYNTAX_FLAGS_COMSTART_FIRST (prev_from_syntax)) | 2623 if (SYNTAX_FLAGS_COMSTART_FIRST (prev_from_syntax)) |
2622 if (c1 = FETCH_CHAR (from_byte), | 2624 if (c1 = FETCH_CHAR (from_byte), |
2623 UPDATE_SYNTAX_TABLE_FORWARD (from_byte), | |
2624 SYNTAX_COMSTART_SECOND (c1)) | 2625 SYNTAX_COMSTART_SECOND (c1)) |
2625 /* Duplicate code to avoid a complex if-expression | 2626 /* Duplicate code to avoid a complex if-expression |
2626 which causes trouble for the SGI compiler. */ | 2627 which causes trouble for the SGI compiler. */ |
2627 { | 2628 { |
2628 /* Record the comment style we have entered so that only | 2629 /* Record the comment style we have entered so that only |