diff options
| author | Richard M. Stallman | 1994-02-03 05:06:01 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-02-03 05:06:01 +0000 |
| commit | 087a5f816bcdce2189a99558a54cb6562078be6a (patch) | |
| tree | 77a4a62c80c244015fe2fe9e8360be4452af45ea /src | |
| parent | 45eb8d9d68659cd44380a0045735dbcc9629abb1 (diff) | |
| download | emacs-087a5f816bcdce2189a99558a54cb6562078be6a.tar.gz emacs-087a5f816bcdce2189a99558a54cb6562078be6a.zip | |
(scan_buffer): New arg ALLOW_QUIT.
(find_next_newline): Pass new arg.
Diffstat (limited to 'src')
| -rw-r--r-- | src/search.c | 12 |
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) | |||
| 263 | If we don't find COUNT instances before reaching the end of the | 263 | If we don't find COUNT instances before reaching the end of the |
| 264 | buffer (or the beginning, if scanning backwards), set *SHORTAGE to | 264 | buffer (or the beginning, if scanning backwards), set *SHORTAGE to |
| 265 | the number of TARGETs left unfound, and return the end of the | 265 | the number of TARGETs left unfound, and return the end of the |
| 266 | buffer we bumped up against. */ | 266 | buffer we bumped up against. |
| 267 | 267 | ||
| 268 | scan_buffer (target, start, count, shortage) | 268 | If ALLOW_QUIT is non-zero, set immediate_quit. That's good to do |
| 269 | except when inside redisplay. */ | ||
| 270 | |||
| 271 | scan_buffer (target, start, count, shortage, allow_quit) | ||
| 269 | int *shortage, start; | 272 | int *shortage, start; |
| 270 | register int count, target; | 273 | register int count, target; |
| 274 | int allow_quit; | ||
| 271 | { | 275 | { |
| 272 | int limit = ((count > 0) ? ZV - 1 : BEGV); | 276 | int limit = ((count > 0) ? ZV - 1 : BEGV); |
| 273 | int direction = ((count > 0) ? 1 : -1); | 277 | int direction = ((count > 0) ? 1 : -1); |
| @@ -281,7 +285,7 @@ scan_buffer (target, start, count, shortage) | |||
| 281 | if (shortage != 0) | 285 | if (shortage != 0) |
| 282 | *shortage = 0; | 286 | *shortage = 0; |
| 283 | 287 | ||
| 284 | immediate_quit = 1; | 288 | immediate_quit = allow_quit; |
| 285 | 289 | ||
| 286 | if (count > 0) | 290 | if (count > 0) |
| 287 | while (start != limit + 1) | 291 | while (start != limit + 1) |
| @@ -348,7 +352,7 @@ int | |||
| 348 | find_next_newline (from, cnt) | 352 | find_next_newline (from, cnt) |
| 349 | register int from, cnt; | 353 | register int from, cnt; |
| 350 | { | 354 | { |
| 351 | return (scan_buffer ('\n', from, cnt, (int *) 0)); | 355 | return scan_buffer ('\n', from, cnt, (int *) 0, 1); |
| 352 | } | 356 | } |
| 353 | 357 | ||
| 354 | Lisp_Object skip_chars (); | 358 | Lisp_Object skip_chars (); |