summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1993-06-10 12:52:31 +0000
committerJim Blandy <jimb@redhat.com>1993-06-10 12:52:31 +0000
commit2d52e48f106dd5d6b935b4eedc79664004b26032 (patch)
tree2515ffa6fd0b33d5945ed1d1c0b36bedfa1ec8f4
parent85be31013c1b4dc8d624d051f6156dafcd336d36 (diff)
downloademacs-2d52e48f106dd5d6b935b4eedc79664004b26032.tar.gz
* search.c (Flooking_at, Fstring_match, fast_string_match,
search_buffer): Don't block input while calling searching and matching functions. These functions may not call malloc under Emacs anyway, and we need to be able to check for C-g.
-rw-r--r--src/search.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/search.c b/src/search.c
index d9c4554cb92..b43756f0a5c 100644
--- a/src/search.c
+++ b/src/search.c
@@ -172,11 +172,9 @@ data if you want to preserve them.")
s2 = 0;
}
- BLOCK_INPUT;
i = re_match_2 (&searchbuf, (char *) p1, s1, (char *) p2, s2,
point - BEGV, &search_regs,
ZV - BEGV);
- UNBLOCK_INPUT;
if (i == -2)
matcher_overflow ();
@@ -224,11 +222,9 @@ matched by parenthesis constructs in the pattern.")
compile_pattern (regexp, &searchbuf, &search_regs,
!NILP (current_buffer->case_fold_search) ? DOWNCASE_TABLE : 0);
immediate_quit = 1;
- BLOCK_INPUT;
val = re_search (&searchbuf, (char *) XSTRING (string)->data,
XSTRING (string)->size, s, XSTRING (string)->size - s,
&search_regs);
- UNBLOCK_INPUT;
immediate_quit = 0;
last_thing_searched = Qt;
if (val == -2)
@@ -249,11 +245,9 @@ fast_string_match (regexp, string)
compile_pattern (regexp, &searchbuf, 0, 0);
immediate_quit = 1;
- BLOCK_INPUT;
val = re_search (&searchbuf, (char *) XSTRING (string)->data,
XSTRING (string)->size, 0, XSTRING (string)->size,
0);
- UNBLOCK_INPUT;
immediate_quit = 0;
return val;
}
@@ -671,12 +665,10 @@ search_buffer (string, pos, lim, n, RE, trt, inverse_trt)
while (n < 0)
{
int val;
- BLOCK_INPUT;
val = re_search_2 (&searchbuf, (char *) p1, s1, (char *) p2, s2,
pos - BEGV, lim - pos, &search_regs,
/* Don't allow match past current point */
pos - BEGV);
- UNBLOCK_INPUT;
if (val == -2)
matcher_overflow ();
if (val >= 0)
@@ -702,11 +694,9 @@ search_buffer (string, pos, lim, n, RE, trt, inverse_trt)
while (n > 0)
{
int val;
- BLOCK_INPUT;
val = re_search_2 (&searchbuf, (char *) p1, s1, (char *) p2, s2,
pos - BEGV, lim - pos, &search_regs,
lim - BEGV);
- UNBLOCK_INPUT;
if (val == -2)
matcher_overflow ();
if (val >= 0)