]> code.delx.au - gnu-emacs/commitdiff
(scan_lists): Check that the right quote char has the
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 9 Dec 2000 20:17:59 +0000 (20:17 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 9 Dec 2000 20:17:59 +0000 (20:17 +0000)
right Sstring syntax when jumping over strings.
(init_syntax_once): Use Smax rather than 13.

src/ChangeLog
src/syntax.c

index 08f329de2ef5a58060ec263aea93b7e3eb8ecd74..2ad78bfe2ffdeb7d23b46b7325023b588885defe 100644 (file)
@@ -1,3 +1,9 @@
+2000-12-09  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * syntax.c (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.
+
 2000-12-09  Miles Bader  <miles@gnu.org>
 
        * window.c (Fpos_visible_in_window_p): Replace FULLY parameter
index 758bec2cf92a5b8db36ba3cc8f86e4c413751a30..6202ef7842fa9044e18a63b28893bd806e182e24 100644 (file)
@@ -2191,8 +2191,9 @@ scan_lists (from, count, depth, sexpflag)
                  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 @@ scan_lists (from, count, depth, sexpflag)
                    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 @@ init_syntax_once ()
   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);