summaryrefslogtreecommitdiff
path: root/src/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex.c')
-rw-r--r--src/regex.c7
1 files changed, 7 insertions, 0 deletions
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);