Mercurial > emacs
comparison src/xdisp.c @ 107584:e0df0337f248
Retrospective commit from 2009-08-15.
Start of work on bidi Emacs 23/24.
bidi.c (bidi_initialize): Fix initialization of bidi_type_table.
xdisp.c (set_iterator_to_next): Fix position setting after call
to bidi_get_next_char_visually.
bidi.c: Include stdio.h unconditionally. Fix and elaborate
commentary. Add Copyright blurb.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Thu, 31 Dec 2009 15:04:11 -0500 |
parents | f35e7896a0fe |
children | cbca7f94b057 |
comparison
equal
deleted
inserted
replaced
107583:f35e7896a0fe | 107584:e0df0337f248 |
---|---|
2656 it->dp = window_display_table (w); | 2656 it->dp = window_display_table (w); |
2657 | 2657 |
2658 /* Are multibyte characters enabled in current_buffer? */ | 2658 /* Are multibyte characters enabled in current_buffer? */ |
2659 it->multibyte_p = !NILP (current_buffer->enable_multibyte_characters); | 2659 it->multibyte_p = !NILP (current_buffer->enable_multibyte_characters); |
2660 | 2660 |
2661 /* Do we need multibyte processing? */ | 2661 /* Do we need to reorded bidirectional text? */ |
2662 it->bidi_p = !NILP (current_buffer->enable_bidi_display); | 2662 it->bidi_p = !NILP (current_buffer->bidi_display_reordering); |
2663 | 2663 |
2664 /* Non-zero if we should highlight the region. */ | 2664 /* Non-zero if we should highlight the region. */ |
2665 highlight_region_p | 2665 highlight_region_p |
2666 = (!NILP (Vtransient_mark_mode) | 2666 = (!NILP (Vtransient_mark_mode) |
2667 && !NILP (current_buffer->mark_active) | 2667 && !NILP (current_buffer->mark_active) |
5518 it->string_from_display_prop_p = 0; | 5518 it->string_from_display_prop_p = 0; |
5519 it->face_before_selective_p = 0; | 5519 it->face_before_selective_p = 0; |
5520 | 5520 |
5521 if (it->bidi_p) | 5521 if (it->bidi_p) |
5522 { | 5522 { |
5523 /* FIXME: L2R below is just for easyness of testing, as we | |
5524 currently support only left-to-right paragraphs. The value | |
5525 should be user-definable and/or come from some ``higher | |
5526 protocol''. In the absence of any other guidance, the default | |
5527 for this initialization should be NEUTRAL_DIR. */ | |
5523 bidi_init_it (pos.charpos - 1, L2R, &it->bidi_it); | 5528 bidi_init_it (pos.charpos - 1, L2R, &it->bidi_it); |
5524 bidi_get_next_char_visually (&it->bidi_it); | 5529 bidi_get_next_char_visually (&it->bidi_it); |
5525 | 5530 |
5526 pos.charpos = it->bidi_it.charpos; | 5531 pos.charpos = it->bidi_it.charpos; |
5527 pos.bytepos = it->bidi_it.bytepos; | 5532 pos.bytepos = it->bidi_it.bytepos; |
6098 IT_CHARPOS (*it) += 1; | 6103 IT_CHARPOS (*it) += 1; |
6099 } | 6104 } |
6100 else | 6105 else |
6101 { | 6106 { |
6102 bidi_get_next_char_visually (&it->bidi_it); | 6107 bidi_get_next_char_visually (&it->bidi_it); |
6103 IT_BYTEPOS (*it) = it->bidi_it.charpos; | 6108 IT_BYTEPOS (*it) = it->bidi_it.bytepos; |
6104 IT_CHARPOS (*it) = it->bidi_it.bytepos; | 6109 IT_CHARPOS (*it) = it->bidi_it.charpos; |
6105 } | 6110 } |
6106 xassert (IT_BYTEPOS (*it) == CHAR_TO_BYTE (IT_CHARPOS (*it))); | 6111 xassert (IT_BYTEPOS (*it) == CHAR_TO_BYTE (IT_CHARPOS (*it))); |
6107 } | 6112 } |
6108 break; | 6113 break; |
6109 | 6114 |