comparison src/syntax.c @ 24148:b69751ec40fe

(scan_sexps_forward): Delete duplicate code to set prev_from_syntax, above start of main loop. At startinstring, check syntax when checking for a match.
author Karl Heuer <kwzh@gnu.org>
date Fri, 22 Jan 1999 21:57:43 +0000
parents ce7900230b17
children e94104cf5891
comparison
equal deleted inserted replaced
24147:c83b0bc4e8b9 24148:b69751ec40fe
2404 goto startinstring; 2404 goto startinstring;
2405 } 2405 }
2406 else if (start_quoted) 2406 else if (start_quoted)
2407 goto startquoted; 2407 goto startquoted;
2408 2408
2409 #if 0 /* This seems to be redundant with the identical code above. */
2409 SETUP_SYNTAX_TABLE (prev_from, 1); 2410 SETUP_SYNTAX_TABLE (prev_from, 1);
2410 prev_from_syntax = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte)); 2411 prev_from_syntax = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte));
2411 UPDATE_SYNTAX_TABLE_FORWARD (from); 2412 UPDATE_SYNTAX_TABLE_FORWARD (from);
2413 #endif
2412 2414
2413 while (from < end) 2415 while (from < end)
2414 { 2416 {
2415 INC_FROM; 2417 INC_FROM;
2416 code = prev_from_syntax & 0xff; 2418 code = prev_from_syntax & 0xff;
2576 { 2578 {
2577 int c; 2579 int c;
2578 2580
2579 if (from >= end) goto done; 2581 if (from >= end) goto done;
2580 c = FETCH_CHAR (from_byte); 2582 c = FETCH_CHAR (from_byte);
2581 if (nofence && c == state.instring) break;
2582
2583 /* Some compilers can't handle this inside the switch. */ 2583 /* Some compilers can't handle this inside the switch. */
2584 temp = SYNTAX (c); 2584 temp = SYNTAX (c);
2585
2586 /* Check TEMP here so that if the char has
2587 a syntax-table property which says it is NOT
2588 a string character, it does not end the string. */
2589 if (nofence && c == state.instring && temp == Sstring)
2590 break;
2591
2585 switch (temp) 2592 switch (temp)
2586 { 2593 {
2587 case Sstring_fence: 2594 case Sstring_fence:
2588 if (!nofence) goto string_end; 2595 if (!nofence) goto string_end;
2589 break; 2596 break;