summaryrefslogtreecommitdiff
path: root/src/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex.c')
-rw-r--r--src/regex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/regex.c b/src/regex.c
index 846c87041b1..763b490c906 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -6197,6 +6197,10 @@ re_compile_pattern (pattern, length, bufp)
{
reg_errcode_t ret;
+#ifdef emacs
+ gl_state.current_syntax_table = current_buffer->syntax_table;
+#endif
+
/* GNU code is written to assume at least RE_NREGS registers will be set
(and at least one extra will be -1). */
bufp->regs_allocated = REGS_UNALLOCATED;