changeset 10141:afe81fd385eb

(compile_pattern): Call re_set_registers here. And no need to BLOCK_INPUT for that. (compile_pattern_1): Instead of here.
author Richard M. Stallman <rms@gnu.org>
date Sun, 11 Dec 1994 08:26:27 +0000
parents 842f6dc76fc6
children 7151108ed6a0
files src/search.c
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/search.c	Sat Dec 10 09:15:58 1994 +0000
+++ b/src/search.c	Sun Dec 11 08:26:27 1994 +0000
@@ -130,13 +130,6 @@
     Fsignal (Qinvalid_regexp, Fcons (build_string (val), Qnil));
 
   cp->regexp = Fcopy_sequence (pattern);
-
-  /* Advise the searching functions about the space we have allocated
-     for register data.  */
-  BLOCK_INPUT;
-  if (regp)
-    re_set_registers (&cp->buf, regp, regp->num_regs, regp->start, regp->end);
-  UNBLOCK_INPUT;
 }
 
 /* Compile a regexp if necessary, but first check to see if there's one in
@@ -182,6 +175,11 @@
   cp->next = searchbuf_head;
   searchbuf_head = cp;
 
+  /* Advise the searching functions about the space we have allocated
+     for register data.  */
+  if (regp)
+    re_set_registers (&cp->buf, regp, regp->num_regs, regp->start, regp->end);
+
   return &cp->buf;
 }