637 |
static enum prop_handled handle_composition_prop P_ ((struct it *)); |
static enum prop_handled handle_composition_prop P_ ((struct it *)); |
638 |
static enum prop_handled handle_overlay_change P_ ((struct it *)); |
static enum prop_handled handle_overlay_change P_ ((struct it *)); |
639 |
static enum prop_handled handle_fontified_prop P_ ((struct it *)); |
static enum prop_handled handle_fontified_prop P_ ((struct it *)); |
640 |
|
static enum prop_handled handle_auto_composed_prop P_ ((struct it *)); |
641 |
|
|
642 |
/* Properties handled by iterators. */ |
/* Properties handled by iterators. */ |
643 |
|
|
644 |
static struct props it_props[] = |
static struct props it_props[] = |
645 |
{ |
{ |
646 |
|
{&Qauto_composed, AUTO_COMPOSED_PROP_IDX, handle_auto_composed_prop}, |
647 |
{&Qfontified, FONTIFIED_PROP_IDX, handle_fontified_prop}, |
{&Qfontified, FONTIFIED_PROP_IDX, handle_fontified_prop}, |
648 |
/* Handle `face' before `display' because some sub-properties of |
/* Handle `face' before `display' because some sub-properties of |
649 |
`display' need to know the face. */ |
`display' need to know the face. */ |
3287 |
`composition' property |
`composition' property |
3288 |
***********************************************************************/ |
***********************************************************************/ |
3289 |
|
|
3290 |
|
static enum prop_handled |
3291 |
|
handle_auto_composed_prop (it) |
3292 |
|
struct it *it; |
3293 |
|
{ |
3294 |
|
enum prop_handled handled = HANDLED_NORMALLY; |
3295 |
|
|
3296 |
|
if (! NILP (Vauto_composition_function)) |
3297 |
|
{ |
3298 |
|
Lisp_Object val; |
3299 |
|
int pos; |
3300 |
|
|
3301 |
|
if (STRINGP (it->string)) |
3302 |
|
pos = IT_STRING_CHARPOS (*it); |
3303 |
|
else |
3304 |
|
pos = IT_CHARPOS (*it); |
3305 |
|
|
3306 |
|
val =Fget_char_property (make_number (pos), Qauto_composed, it->string); |
3307 |
|
if (NILP (val)) |
3308 |
|
{ |
3309 |
|
int count = BINDING_STACK_SIZE (); |
3310 |
|
Lisp_Object args[3]; |
3311 |
|
|
3312 |
|
args[0] = Vauto_composition_function; |
3313 |
|
specbind (Qauto_composition_function, Qnil); |
3314 |
|
args[1] = make_number (pos); |
3315 |
|
args[2] = it->string; |
3316 |
|
safe_call (3, args); |
3317 |
|
unbind_to (count, Qnil); |
3318 |
|
|
3319 |
|
val = Fget_char_property (args[1], Qauto_composed, it->string); |
3320 |
|
if (! NILP (val)) |
3321 |
|
handled = HANDLED_RECOMPUTE_PROPS; |
3322 |
|
} |
3323 |
|
} |
3324 |
|
|
3325 |
|
return handled; |
3326 |
|
} |
3327 |
|
|
3328 |
/* Set up iterator IT from `composition' property at its current |
/* Set up iterator IT from `composition' property at its current |
3329 |
position. Called from handle_stop. */ |
position. Called from handle_stop. */ |
3330 |
|
|