summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2010-03-05 14:54:39 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2010-03-05 14:54:39 -0500
commit254c06a8d8d516a22c9b72dd1c1e32a2e6a83139 (patch)
treebbfbd50d7f86a0e645cafa6f56c9b2f588ca53ba
parent618db430981dbc0dfed318503808bb7b744750b7 (diff)
downloademacs-254c06a8d8d516a22c9b72dd1c1e32a2e6a83139.tar.gz
* regex.c (regex_compile): Setup gl_state as well.
-rw-r--r--src/ChangeLog2
-rw-r--r--src/regex.c7
2 files changed, 9 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c6bb157aea7..f7226d6fc6f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/regex.c b/src/regex.c
index bb921a5b519..f242446796d 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -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);