]> git.eshelyaron.com Git - emacs.git/commitdiff
(scan_sexps_forward): Delete duplicate code
authorKarl Heuer <kwzh@gnu.org>
Fri, 22 Jan 1999 21:57:43 +0000 (21:57 +0000)
committerKarl Heuer <kwzh@gnu.org>
Fri, 22 Jan 1999 21:57:43 +0000 (21:57 +0000)
to set prev_from_syntax, above start of main loop.
At startinstring, check syntax when checking for a match.

src/syntax.c

index 884ce5bf20a0cdc0bd09b5705f7aba9be64f78b2..af2554b3e850fabb124106b427764a3ba3527ed5 100644 (file)
@@ -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: