diff options
| author | Kenichi Handa | 2004-10-18 12:26:36 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2004-10-18 12:26:36 +0000 |
| commit | be5f4dfb0144b5aa94c51a82acf6dd073efc3527 (patch) | |
| tree | 2fc35178e88155340216e129371e1db9d815a0dd /src | |
| parent | a0aa1111d931e801f245d5ebce6c91cccdbcba65 (diff) | |
| download | emacs-be5f4dfb0144b5aa94c51a82acf6dd073efc3527.tar.gz emacs-be5f4dfb0144b5aa94c51a82acf6dd073efc3527.zip | |
(fast_string_match_ignore_case): New function.
Diffstat (limited to 'src')
| -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 0375f353dd2..f7bee1b8683 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -493,6 +493,27 @@ fast_c_string_match_ignore_case (regexp, string) | |||
| 493 | immediate_quit = 0; | 493 | immediate_quit = 0; |
| 494 | return val; | 494 | return val; |
| 495 | } | 495 | } |
| 496 | |||
| 497 | /* Like fast_string_match but ignore case. */ | ||
| 498 | |||
| 499 | int | ||
| 500 | fast_string_match_ignore_case (regexp, string) | ||
| 501 | Lisp_Object regexp, string; | ||
| 502 | { | ||
| 503 | int val; | ||
| 504 | struct re_pattern_buffer *bufp; | ||
| 505 | |||
| 506 | bufp = compile_pattern (regexp, 0, Vascii_downcase_table, | ||
| 507 | 0, STRING_MULTIBYTE (string)); | ||
| 508 | immediate_quit = 1; | ||
| 509 | re_match_object = string; | ||
| 510 | |||
| 511 | val = re_search (bufp, (char *) SDATA (string), | ||
| 512 | SBYTES (string), 0, | ||
| 513 | SBYTES (string), 0); | ||
| 514 | immediate_quit = 0; | ||
| 515 | return val; | ||
| 516 | } | ||
| 496 | 517 | ||
| 497 | /* The newline cache: remembering which sections of text have no newlines. */ | 518 | /* The newline cache: remembering which sections of text have no newlines. */ |
| 498 | 519 | ||