aboutsummaryrefslogtreecommitdiffstats
path: root/src/dispextern.h
diff options
context:
space:
mode:
authorEli Zaretskii2011-06-25 14:44:30 +0300
committerEli Zaretskii2011-06-25 14:44:30 +0300
commit0c22566f00ee467af8d41ef7dc9f18c3b66630c5 (patch)
tree7db72a0297d9f21e0582d94286c21cad2c64dfa9 /src/dispextern.h
parent58b9f433ad4a4ea20e0c51997ca8a9aaab79a213 (diff)
downloademacs-0c22566f00ee467af8d41ef7dc9f18c3b66630c5.tar.gz
emacs-0c22566f00ee467af8d41ef7dc9f18c3b66630c5.zip
Set up the bidi iterator for iterating display strings and overlay strings.
Not tested yet, just compiled. src/xdisp.c (handle_single_display_spec, next_overlay_string) (get_overlay_strings_1, push_display_prop): Set up the bidi iterator for displaying display or overlay strings. (forward_to_next_line_start): Don't use the shortcut if bidi-iterating. (back_to_previous_visible_line_start): If handle_display_prop pushed the iterator stack, restore the internal state of the bidi iterator by calling bidi_pop_it same number of times. (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero, and we are bidi-iterating, don't decrement the iterator position; instead, set the first_elt flag in the bidi iterator, to produce the same effect. (reseat_1): Remove redundant setting of string_from_display_prop_p. (push_display_prop): xassert that we are iterating a buffer. (push_it, pop_it): Save and restore the state of the bidi iterator. Save and restore the bidi_p flag. (pop_it): Iterate out of display property for string iteration as well. (iterate_out_of_display_property): Support iteration over strings. (handle_single_display_spec): Set up it->bidi_it for iteration over a display string, and call bidi_init_it. src/bidi.c (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE. src/dispextern.h (struct iterator_stack_entry): New member bidi_p. (struct it): Member bidi_p is now a bit field 1 bit wide.
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index acd7862e5dc..d5479c7a64e 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2157,7 +2157,9 @@ struct it
2157 Lisp_Object *dpvec, *dpend; 2157 Lisp_Object *dpvec, *dpend;
2158 2158
2159 /* Length in bytes of the char that filled dpvec. A value of zero 2159 /* Length in bytes of the char that filled dpvec. A value of zero
2160 means that no such character is involved. */ 2160 means that no such character is involved. A negative value means
2161 the rest of the line from the current iterator position onwards
2162 is hidden by selective display or ellipsis. */
2161 int dpvec_char_len; 2163 int dpvec_char_len;
2162 2164
2163 /* Face id to use for all characters in display vector. -1 if unused. */ 2165 /* Face id to use for all characters in display vector. -1 if unused. */
@@ -2253,6 +2255,7 @@ struct it
2253 unsigned string_from_display_prop_p : 1; 2255 unsigned string_from_display_prop_p : 1;
2254 unsigned display_ellipsis_p : 1; 2256 unsigned display_ellipsis_p : 1;
2255 unsigned avoid_cursor_p : 1; 2257 unsigned avoid_cursor_p : 1;
2258 unsigned bidi_p:1;
2256 enum line_wrap_method line_wrap; 2259 enum line_wrap_method line_wrap;
2257 2260
2258 /* properties from display property that are reset by another display property. */ 2261 /* properties from display property that are reset by another display property. */
@@ -2473,7 +2476,7 @@ struct it
2473 2476
2474 /* Non-zero means we need to reorder bidirectional text for display 2477 /* Non-zero means we need to reorder bidirectional text for display
2475 in the visual order. */ 2478 in the visual order. */
2476 int bidi_p; 2479 unsigned bidi_p : 1;
2477 2480
2478 /* For iterating over bidirectional text. */ 2481 /* For iterating over bidirectional text. */
2479 struct bidi_it bidi_it; 2482 struct bidi_it bidi_it;