aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/search.c21
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
499int
500fast_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