]> git.eshelyaron.com Git - emacs.git/commitdiff
(compile_pattern): Call re_set_registers here.
authorRichard M. Stallman <rms@gnu.org>
Sun, 11 Dec 1994 08:26:27 +0000 (08:26 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 11 Dec 1994 08:26:27 +0000 (08:26 +0000)
And no need to BLOCK_INPUT for that.
(compile_pattern_1): Instead of here.

src/search.c

index 0d5f5dcf158ec7fa63cf045ba587022bc18a67e1..7d89696e7c8ca251276ebb8fc5870f98092a080e 100644 (file)
@@ -130,13 +130,6 @@ compile_pattern_1 (cp, pattern, translate, regp, posix)
     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 @@ compile_pattern (pattern, regp, translate, posix)
   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;
 }