aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/search.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/search.c b/src/search.c
index 0d5f5dcf158..7d89696e7c8 100644
--- a/src/search.c
+++ b/src/search.c
@@ -130,13 +130,6 @@ compile_pattern_1 (cp, pattern, translate, regp, posix)
130 Fsignal (Qinvalid_regexp, Fcons (build_string (val), Qnil)); 130 Fsignal (Qinvalid_regexp, Fcons (build_string (val), Qnil));
131 131
132 cp->regexp = Fcopy_sequence (pattern); 132 cp->regexp = Fcopy_sequence (pattern);
133
134 /* Advise the searching functions about the space we have allocated
135 for register data. */
136 BLOCK_INPUT;
137 if (regp)
138 re_set_registers (&cp->buf, regp, regp->num_regs, regp->start, regp->end);
139 UNBLOCK_INPUT;
140} 133}
141 134
142/* Compile a regexp if necessary, but first check to see if there's one in 135/* Compile a regexp if necessary, but first check to see if there's one in
@@ -182,6 +175,11 @@ compile_pattern (pattern, regp, translate, posix)
182 cp->next = searchbuf_head; 175 cp->next = searchbuf_head;
183 searchbuf_head = cp; 176 searchbuf_head = cp;
184 177
178 /* Advise the searching functions about the space we have allocated
179 for register data. */
180 if (regp)
181 re_set_registers (&cp->buf, regp, regp->num_regs, regp->start, regp->end);
182
185 return &cp->buf; 183 return &cp->buf;
186} 184}
187 185