summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-02-03 05:06:01 +0000
committerRichard M. Stallman <rms@gnu.org>1994-02-03 05:06:01 +0000
commit3d1c9f491c3789f655ef4ae5b75d59a4979836e5 (patch)
tree62930b2b16e977ab4945666eea7ee24eb9764d24 /src/search.c
parent0fdd2e63de6888be508b479fdc877acbc9ae398a (diff)
downloademacs-3d1c9f491c3789f655ef4ae5b75d59a4979836e5.tar.gz
(scan_buffer): New arg ALLOW_QUIT.
(find_next_newline): Pass new arg.
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/search.c b/src/search.c
index 47f52380b9e..4d39d38c68a 100644
--- a/src/search.c
+++ b/src/search.c
@@ -263,11 +263,15 @@ fast_string_match (regexp, string)
If we don't find COUNT instances before reaching the end of the
buffer (or the beginning, if scanning backwards), set *SHORTAGE to
the number of TARGETs left unfound, and return the end of the
- buffer we bumped up against. */
+ buffer we bumped up against.
-scan_buffer (target, start, count, shortage)
+ If ALLOW_QUIT is non-zero, set immediate_quit. That's good to do
+ except when inside redisplay. */
+
+scan_buffer (target, start, count, shortage, allow_quit)
int *shortage, start;
register int count, target;
+ int allow_quit;
{
int limit = ((count > 0) ? ZV - 1 : BEGV);
int direction = ((count > 0) ? 1 : -1);
@@ -281,7 +285,7 @@ scan_buffer (target, start, count, shortage)
if (shortage != 0)
*shortage = 0;
- immediate_quit = 1;
+ immediate_quit = allow_quit;
if (count > 0)
while (start != limit + 1)
@@ -348,7 +352,7 @@ int
find_next_newline (from, cnt)
register int from, cnt;
{
- return (scan_buffer ('\n', from, cnt, (int *) 0));
+ return scan_buffer ('\n', from, cnt, (int *) 0, 1);
}
Lisp_Object skip_chars ();