changeset 34398:945b3e6bf3e7

(scan_lists): Check that the right quote char has the right Sstring syntax when jumping over strings. (init_syntax_once): Use Smax rather than 13.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 09 Dec 2000 20:17:47 +0000
parents 88b84e8b25e9
children 4521921a599e
files src/syntax.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/syntax.c	Sat Dec 09 18:20:51 2000 +0000
+++ b/src/syntax.c	Sat Dec 09 20:17:47 2000 +0000
@@ -2191,8 +2191,9 @@
 		  if (from >= stop) goto lose;
 		  UPDATE_SYNTAX_TABLE_FORWARD (from);
 		  c = FETCH_CHAR (from_byte);
-		  if (code == Sstring 
-		      ? c == stringterm
+		  if (code == Sstring
+		      ? (c == stringterm
+			 && SYNTAX_WITH_MULTIBYTE_CHECK (c) == Sstring)
 		      : SYNTAX_WITH_MULTIBYTE_CHECK (c) == Sstring_fence)
 		    break;
 
@@ -2369,7 +2370,8 @@
 		    temp_pos--;
 		  UPDATE_SYNTAX_TABLE_BACKWARD (from - 1);
 		  if (!char_quoted (from - 1, temp_pos)
-		      && stringterm == FETCH_CHAR (temp_pos))
+		      && stringterm == (c = FETCH_CHAR (temp_pos))
+		      && SYNTAX_WITH_MULTIBYTE_CHECK (c) == Sstring)
 		    break;
 		  DEC_BOTH (from, from_byte);
 		}
@@ -2942,7 +2944,7 @@
   Qchar_table_extra_slots = intern ("char-table-extra-slots");
 
   /* Create objects which can be shared among syntax tables.  */
-  Vsyntax_code_object = Fmake_vector (make_number (13), Qnil);
+  Vsyntax_code_object = Fmake_vector (make_number (Smax), Qnil);
   for (i = 0; i < XVECTOR (Vsyntax_code_object)->size; i++)
     XVECTOR (Vsyntax_code_object)->contents[i]
       = Fcons (make_number (i), Qnil);