diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-12-11 08:26:27 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-12-11 08:26:27 +0000 |
commit | 253a32f4a3e8d335e1b9b599d3d45c4a43855331 (patch) | |
tree | 7f4427c9ff09177a26d287a4cb95514c4cdc5c2f /src/search.c | |
parent | 85f697b9f688918833d49b63f8c967e441f1eebb (diff) | |
download | emacs-253a32f4a3e8d335e1b9b599d3d45c4a43855331.tar.gz |
(compile_pattern): Call re_set_registers here.
And no need to BLOCK_INPUT for that.
(compile_pattern_1): Instead of here.
Diffstat (limited to 'src/search.c')
-rw-r--r-- | src/search.c | 12 |
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) 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; } |