diff options
author | Kenichi Handa <handa@m17n.org> | 2004-10-18 12:26:36 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2004-10-18 12:26:36 +0000 |
commit | be5f4dfb0144b5aa94c51a82acf6dd073efc3527 (patch) | |
tree | 2fc35178e88155340216e129371e1db9d815a0dd /src/search.c | |
parent | a0aa1111d931e801f245d5ebce6c91cccdbcba65 (diff) | |
download | emacs-be5f4dfb0144b5aa94c51a82acf6dd073efc3527.tar.gz |
(fast_string_match_ignore_case): New function.
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 0375f353dd2..f7bee1b8683 100644 --- a/src/search.c +++ b/src/search.c @@ -493,6 +493,27 @@ fast_c_string_match_ignore_case (regexp, string) immediate_quit = 0; return val; } + +/* Like fast_string_match but ignore case. */ + +int +fast_string_match_ignore_case (regexp, string) + Lisp_Object regexp, string; +{ + int val; + struct re_pattern_buffer *bufp; + + bufp = compile_pattern (regexp, 0, Vascii_downcase_table, + 0, STRING_MULTIBYTE (string)); + immediate_quit = 1; + re_match_object = string; + + val = re_search (bufp, (char *) SDATA (string), + SBYTES (string), 0, + SBYTES (string), 0); + immediate_quit = 0; + return val; +} /* The newline cache: remembering which sections of text have no newlines. */ |