changeset 22994:85f64bf341c3

(scan_sexps_forward): Set up the syntax table scanning stuff before jumping into the loop.
author Richard M. Stallman <rms@gnu.org>
date Mon, 10 Aug 1998 21:19:03 +0000
parents f580b9694876
children bc5bd04bf914
files src/syntax.c
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/syntax.c	Mon Aug 10 21:13:58 1998 +0000
+++ b/src/syntax.c	Mon Aug 10 21:19:03 1998 +0000
@@ -2383,17 +2383,23 @@
   curlevel->prev = -1;
   curlevel->last = -1;
 
+  SETUP_SYNTAX_TABLE (prev_from, 1);
+  prev_from_syntax = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte));
+  UPDATE_SYNTAX_TABLE_FORWARD (from);
+
   /* Enter the loop at a place appropriate for initial state.  */
 
-  if (state.incomment) goto startincomment;
+  if (state.incomment)
+    goto startincomment;
   if (state.instring >= 0)
     {
       nofence = state.instring != ST_STRING_STYLE;
-      if (start_quoted) goto startquotedinstring;
+      if (start_quoted)
+	goto startquotedinstring;
       goto startinstring;
     }
-  if (start_quoted) goto startquoted;
-
+  else if (start_quoted)
+    goto startquoted;
 
   SETUP_SYNTAX_TABLE (prev_from, 1);
   prev_from_syntax = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte));