]> git.eshelyaron.com Git - emacs.git/commitdiff
* regex.c (regex_compile): Setup gl_state as well.
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 5 Mar 2010 19:54:39 +0000 (14:54 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 5 Mar 2010 19:54:39 +0000 (14:54 -0500)
src/ChangeLog
src/regex.c

index c6bb157aea747e7ad116f403023f7bd9a6e84709..f7226d6fc6faefc6bb8a2829dcd6b9be8a36d9ce 100644 (file)
@@ -1,5 +1,7 @@
 2010-03-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * regex.c (regex_compile): Setup gl_state as well.
+
        * syntax.c (skip_chars): Setup gl_state (bug#3823).
        (in_classes): Use CONSP before XCAR/XCDR.
 
index bb921a5b519e2c4462bad68d65399a04bb195121..f242446796d7518b7bfef57accfba6a47b19312b 100644 (file)
@@ -3065,6 +3065,13 @@ regex_compile (pattern, size, syntax, bufp)
                           don't need to handle them for multibyte.
                           They are distinguished by a negative wctype.  */
 
+                       /* Setup the gl_state object to its buffer-defined
+                          value.  This hardcodes the buffer-global
+                          syntax-table for ASCII chars, while the other chars
+                          will obey syntax-table properties.  It's not ideal,
+                          but it's the way it's been done until now.  */
+                       SETUP_SYNTAX_TABLE (BEGV, 0);
+
                        for (ch = 0; ch < 256; ++ch)
                          {
                            c = RE_CHAR_TO_MULTIBYTE (ch);