diff src/regex.c @ 107336:a2b9cb6b7cb7

* regex.c (regex_compile): Setup gl_state as well.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 05 Mar 2010 14:54:39 -0500
parents eb7555fbea3b
children 14ff9accfbd3 b465aa3255ed
line wrap: on
line diff
--- a/src/regex.c	Fri Mar 05 13:42:38 2010 -0500
+++ b/src/regex.c	Fri Mar 05 14:54:39 2010 -0500
@@ -3065,6 +3065,13 @@
 			   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);