changeset 3615:57086acfac3e

* 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.
author Jim Blandy <jimb@redhat.com>
date Thu, 10 Jun 1993 12:52:31 +0000
parents 00fa1b757db8
children 05cf1ccf2ada
files src/search.c
diffstat 1 files changed, 0 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/search.c	Thu Jun 10 12:50:56 1993 +0000
+++ b/src/search.c	Thu Jun 10 12:52:31 1993 +0000
@@ -172,11 +172,9 @@
       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 @@
   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 @@
 
   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 @@
       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 @@
       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)