summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1999-01-22 21:57:43 +0000
committerKarl Heuer <kwzh@gnu.org>1999-01-22 21:57:43 +0000
commitccf89641df04d50bf9ae6e21beb1b094b4b77ab2 (patch)
tree8d382d2c5e12fdb25cde5f2984e50e8a1e4dca27 /src/syntax.c
parent33d52f9c454e9fbe561d1fa700bc8fda312d789c (diff)
downloademacs-ccf89641df04d50bf9ae6e21beb1b094b4b77ab2.tar.gz
(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/syntax.c')
-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; \
else if (start_quoted)
goto startquoted;
+#if 0 /* This seems to be redundant with the identical code above. */
SETUP_SYNTAX_TABLE (prev_from, 1);
prev_from_syntax = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte));
UPDATE_SYNTAX_TABLE_FORWARD (from);
+#endif
while (from < end)
{
@@ -2578,10 +2580,15 @@ do { prev_from = from; \
if (from >= end) goto done;
c = FETCH_CHAR (from_byte);
- if (nofence && c == state.instring) break;
-
/* Some compilers can't handle this inside the switch. */
temp = SYNTAX (c);
+
+ /* Check TEMP here so that if the char has
+ a syntax-table property which says it is NOT
+ a string character, it does not end the string. */
+ if (nofence && c == state.instring && temp == Sstring)
+ break;
+
switch (temp)
{
case Sstring_fence: