/* Composite sequence support.
Copyright (C) 1999 Electrotechnical Laboratory, JAPAN.
- Licensed to the Free Software Foundation.
+ Licensed to the Free Software Foundation.
Copyright (C) 2001 Free Software Foundation, Inc.
- Copyright (C) 2001, 2002
+ Copyright (C) 2003
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
}
/* This composition is a new one. We must register it. */
-
+
/* Check if we have sufficient memory to store this information. */
if (composition_table_size == 0)
{
&& 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));
}
It also resets the text-property `auto-composed' to a proper region
so that automatic character composition works correctly later while
displaying the region.
-
+
This function is called when a buffer text is changed. If the
change is deletion, FROM == TO. Otherwise, FROM < TO. */
if (inhibit_modification_hooks)
return;
-
+
/* If FROM and TO are not in a valid range, do nothing. */
if (! (BEGV <= from && from <= to && to <= ZV))
return;
max_pos = end;
}
}
-
if (min_pos < max_pos)
- Fput_text_property (make_number (min_pos), make_number (max_pos),
- Qauto_composed, Qnil, Qnil);
+ Fremove_list_of_text_properties (make_number (min_pos),
+ make_number (max_pos),
+ Fcons (Qauto_composed, Qnil), Qnil);
}
Fput_text_property (make_number (start), make_number (end),
Qcomposition, prop, string);
}
-
\f
/* Emacs Lisp APIs. */
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);
}
DEFUN ("find-composition-internal", Ffind_composition_internal,
- Sfind_composition_internal, 4, 4, 0,
+ Sfind_composition_internal, 4, 4, 0,
doc: /* Internal use only.
Return information about composition at or nearest to position POS.
}
else
end = -1;
-
+
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
{
Lisp_Object args[6];
extern Lisp_Object QCsize;
-
+
args[0] = QCtest;
args[1] = Qequal;
args[2] = QCweakness;
- args[3] = Qnil;
+ args[3] = Qt;
args[4] = QCsize;
args[5] = make_number (311);
composition_hash_table = Fmake_hash_table (6, args);