extern Lisp_Object Vascii_downcase_table;
int
-fast_string_match_ignore_case (regexp, string)
+fast_c_string_match_ignore_case (regexp, string)
Lisp_Object regexp;
char *string;
{
struct re_pattern_buffer *bufp;
int len = strlen (string);
+ re_match_object = Qt;
bufp = compile_pattern (regexp, 0,
XCHAR_TABLE (Vascii_downcase_table)->contents, 0);
immediate_quit = 1;
len--;
base_pat++;
}
- *pat++ = (trt ? trt[*base_pat++] : *base_pat++);
+ *pat++ = (trt ? XINT (trt[*base_pat++]) : *base_pat++);
}
len = pat - patbuf;
pat = base_pat = patbuf;
if (i == dirlen) i = infinity;
if (trt != 0)
{
- k = (j = trt[j]);
+ k = (j = XINT (trt[j]));
if (i == infinity)
stride_for_teases = BM_tab[j];
BM_tab[j] = dirlen - i;
/* A translation table is accompanied by its inverse -- see */
/* comment following downcase_table for details */
- while ((j = (unsigned char) inverse_trt[j]) != k)
+ while ((j = (unsigned char) XINT (inverse_trt[j])) != k)
BM_tab[j] = dirlen - i;
}
else
if (trt != 0)
{
while ((i -= direction) + direction != 0)
- if (pat[i] != trt[*(cursor -= direction)])
+ if (pat[i] != XINT (trt[*(cursor -= direction)]))
break;
}
else
{
pos -= direction;
if (pat[i] != (trt != 0
- ? trt[FETCH_BYTE (pos)]
+ ? XINT (trt[FETCH_BYTE (pos)])
: FETCH_BYTE (pos)))
break;
}
register int c, prevc;
int inslen;
int sub;
- int opoint;
+ int opoint, newpoint;
CHECK_STRING (newtext, 0);
else if (case_action == cap_initial)
Fupcase_initials_region (make_number (PT - inslen), make_number (PT));
+ newpoint = PT;
+
/* Put point back where it was in the text. */
- if (opoint < 0)
+ if (opoint <= 0)
temp_set_point (opoint + ZV, current_buffer);
else
temp_set_point (opoint, current_buffer);
/* Now move point "officially" to the start of the inserted replacement. */
- move_if_not_intangible (search_regs.start[sub]);
+ move_if_not_intangible (newpoint);
return Qnil;
}