aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1999-01-22 21:57:43 +0000
committerKarl Heuer1999-01-22 21:57:43 +0000
commitccf89641df04d50bf9ae6e21beb1b094b4b77ab2 (patch)
tree8d382d2c5e12fdb25cde5f2984e50e8a1e4dca27 /src
parent33d52f9c454e9fbe561d1fa700bc8fda312d789c (diff)
downloademacs-ccf89641df04d50bf9ae6e21beb1b094b4b77ab2.tar.gz
emacs-ccf89641df04d50bf9ae6e21beb1b094b4b77ab2.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/syntax.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 884ce5bf20a..af2554b3e85 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -2406,9 +2406,11 @@ do { prev_from = from; \
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 {
@@ -2578,10 +2580,15 @@ do { prev_from = from; \
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: