diff options
Diffstat (limited to 'src/search.c')
| -rw-r--r-- | src/search.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/search.c b/src/search.c index a00490fd4b3..be2ea2bcd89 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -460,6 +460,27 @@ fast_c_string_match_ignore_case (regexp, string) | |||
| 460 | immediate_quit = 0; | 460 | immediate_quit = 0; |
| 461 | return val; | 461 | return val; |
| 462 | } | 462 | } |
| 463 | |||
| 464 | /* Like fast_string_match but ignore case. */ | ||
| 465 | |||
| 466 | int | ||
| 467 | fast_string_match_ignore_case (regexp, string) | ||
| 468 | Lisp_Object regexp, string; | ||
| 469 | { | ||
| 470 | int val; | ||
| 471 | struct re_pattern_buffer *bufp; | ||
| 472 | |||
| 473 | bufp = compile_pattern (regexp, 0, Vascii_downcase_table, | ||
| 474 | 0, STRING_MULTIBYTE (string)); | ||
| 475 | immediate_quit = 1; | ||
| 476 | re_match_object = string; | ||
| 477 | |||
| 478 | val = re_search (bufp, (char *) SDATA (string), | ||
| 479 | SBYTES (string), 0, | ||
| 480 | SBYTES (string), 0); | ||
| 481 | immediate_quit = 0; | ||
| 482 | return val; | ||
| 483 | } | ||
| 463 | 484 | ||
| 464 | /* The newline cache: remembering which sections of text have no newlines. */ | 485 | /* The newline cache: remembering which sections of text have no newlines. */ |
| 465 | 486 | ||