&& find_composition (to, -1, &start, &end, &prop, Qnil)
&& !COMPOSITION_VALID_P (start, end, prop))
to = end;
- if (!NILP (func))
+ if (!NILP (Ffboundp (func)))
call2 (func, make_number (from), make_number (to));
else if (!NILP (Ffboundp (Vcompose_chars_after_function)))
call3 (Vcompose_chars_after_function,
void
update_compositions (from, to, check_mask)
- int from, to;
+ int from, to, check_mask;
{
Lisp_Object prop;
int start, end;
/* Set to nonzero if we don't have to compose ASCII characters. */
int skip_ascii;
int i, len, stop, c;
- unsigned char *ptr, *pend;
+ const unsigned char *ptr, *pend;
if (! CHAR_TABLE_P (Vcomposition_function_table))
return;
if (STRINGP (string))
{
- count = specpdl_ptr - specpdl;
+ count = SPECPDL_INDEX ();
GCPRO1 (string);
stop = end;
- ptr = XSTRING (string)->data + string_char_to_byte (string, start);
- pend = ptr + STRING_BYTES (XSTRING (string));
+ ptr = SDATA (string) + string_char_to_byte (string, start);
+ pend = ptr + SBYTES (string);
}
else
{
break;
stop = end;
if (STRINGP (string))
- ptr = XSTRING (string)->data + string_char_to_byte (string, start);
+ ptr = SDATA (string) + string_char_to_byte (string, start);
else
ptr = CHAR_POS_ADDR (start);
}
{
start += XINT (val);
if (STRINGP (string))
- ptr = XSTRING (string)->data + string_char_to_byte (string, start);
+ ptr = SDATA (string) + string_char_to_byte (string, start);
else
ptr = CHAR_POS_ADDR (start);
}
Compose text in the region between START and END.
Optional 3rd and 4th arguments are COMPONENTS and MODIFICATION-FUNC
-for the composition. See `compose-region' for more detail. */)
+for the composition. See `compose-region' for more detail. */)
(start, end, components, mod_func)
Lisp_Object start, end, components, mod_func;
{
Compose text between indices START and END of STRING.
Optional 4th and 5th arguments are COMPONENTS and MODIFICATION-FUNC
-for the composition. See `compose-string' for more detail. */)
+for the composition. See `compose-string' for more detail. */)
(string, start, end, components, mod_func)
Lisp_Object string, start, end, components, mod_func;
{
if (XINT (start) < 0 ||
XINT (start) > XINT (end)
- || XINT (end) > XSTRING (string)->size)
+ || XINT (end) > SCHARS (string))
args_out_of_range (start, end);
compose_text (XINT (start), XINT (end), components, mod_func, string);
if (!NILP (string))
{
CHECK_STRING (string);
- if (XINT (pos) < 0 || XINT (pos) > XSTRING (string)->size)
+ if (XINT (pos) < 0 || XINT (pos) > SCHARS (string))
args_out_of_range (string, pos);
}
else