diff options
| author | Richard M. Stallman | 1994-12-11 08:26:27 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-12-11 08:26:27 +0000 |
| commit | 6639708c3dc9af310053ef9f587b963de9ec30dc (patch) | |
| tree | 0d4c15cea40750585c0d4d7d3ee9cc46cba2cfe7 /src | |
| parent | 3b5e348cccdb0bc8208ee488b863ddc4fcc6a6c0 (diff) | |
| download | emacs-6639708c3dc9af310053ef9f587b963de9ec30dc.tar.gz emacs-6639708c3dc9af310053ef9f587b963de9ec30dc.zip | |
(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')
| -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) | |||
| 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 | ||