Initial version of string reordering. Tested only on mode line and
[bpt/emacs.git] / src / ChangeLog
index 12c0bde..3ca0241 100644 (file)
@@ -1,3 +1,124 @@
+2011-06-11  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (next_element_from_buffer): Improve commentary for when
+       the iterator is before prev_stop.
+       (init_iterator): Initialize bidi_p from the default value of
+       bidi-display-reordering, not from buffer-local value.  Use the
+       buffer-local value only if initializing for buffer iteration.
+       (handle_invisible_prop): Support invisible properties on strings
+       that are being bidi-reordered.
+       (reseat_to_string): Enable bidi-related code.
+       (set_iterator_to_next): Support bidi reordering of C strings and
+       Lisp strings.
+       (next_element_from_string): Support bidi reordering of Lisp
+       strings.
+       (handle_stop_backwards): Support Lisp strings as well.
+       (display_mode_line, display_mode_element): Temporarily force L2R
+       paragraph direction.
+       (display_string): Support display of R2L glyph rows.  Use
+       IT_STRING_CHARPOS when displaying from a Lisp string.
+
+2011-06-10  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
+       itb.string.lstring.
+       (compute_display_string_pos, compute_display_string_end):
+       Fix calculation of the object to scan.  Fixes an error when using
+       arrow keys.
+       (next_element_from_buffer): Don't abort when IT_CHARPOS is before
+       base_level_stop; instead, set base_level_stop to BEGV.  Fixes
+       crashes in vertical-motion.
+
+2011-06-09  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (compute_display_string_pos): First arg is now struct
+       `text_pos *'; all callers changed.  Support display properties on
+       Lisp strings.
+       (compute_display_string_end): Support display properties on Lisp
+       strings.
+       (init_iterator, reseat_1, reseat_to_string): Initialize the
+       string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
+       when iterating on a string not from display properties).
+
+       * bidi.c (bidi_fetch_char): Support strings with display
+       properties.
+
+       * dispextern.h (struct bidi_string_data): New member bufpos.
+       (compute_display_string_pos): Update prototype.
+
+2011-06-09  Eli Zaretskii  <eliz@gnu.org>
+
+       * bidi.c (bidi_level_of_next_char): Allow the sentinel "position"
+       to pass the test for valid cached positions.
+
+       * xdisp.c (init_iterator): Call bidi_init_it only of a valid
+       buffer position was specified.  Initialize paragraph_embedding to
+       L2R.
+       (reseat_to_string): Initialize the bidi iterator (for now ifdef'ed
+       out).
+       (display_string): If we need to ignore text properties of
+       LISP_STRING, set IT->stop_charpos to IT->end_charpos.  (The
+       original value of -1 will not work with bidi.)
+
+       * dispextern.h (struct bidi_string_data): New member lstring.
+
+2011-06-09  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
+       itb.string.s to NULL (avoids a crash in bidi_paragraph_init).
+
+2011-06-08  Eli Zaretskii  <eliz@gnu.org>
+
+       * bidi.c (bidi_paragraph_info): Delete unused struct.
+       (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
+       (bidi_cache_start): New variable.
+       (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
+       to zero.
+       (bidi_cache_fetch_state, bidi_cache_search)
+       (bidi_cache_find_level_change, bidi_cache_iterator_state)
+       (bidi_cache_find, bidi_peek_at_next_level)
+       (bidi_level_of_next_char, bidi_find_other_level_edge)
+       (bidi_move_to_visually_next): Compare cache index with
+       bidi_cache_start rather than with zero.
+       (bidi_fetch_char): Accept new argument STRING; all callers
+       changed.  Support iteration over a string.
+       (bidi_paragraph_init, bidi_resolve_explicit_1)
+       (bidi_resolve_explicit, bidi_resolve_weak)
+       (bidi_level_of_next_char, bidi_move_to_visually_next): Support
+       iteration over a string.
+       (bidi_set_sor_type, bidi_resolve_explicit_1)
+       (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
+       can now be zero (for strings); special values 0 and -1 were
+       changed to -1 and -2, respectively.
+       (bidi_char_at_pos): New function.
+       (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
+       Call it instead of FETCH_MULTIBYTE_CHAR.
+       (bidi_move_to_visually_next): Abort if charpos or bytepos were not
+       initialized to valid values.
+       (bidi_init_it): Don't initialize charpos and bytepos with invalid
+       values.
+
+       * xdisp.c (compute_display_string_pos)
+       (compute_display_string_end): Accept additional argument STRING.
+       (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
+       (reseat_to_string): Initialize bidi_it->string.s and
+       bidi_it->string.schars.
+
+       * dispextern.h (struct bidi_string_data): New structure.
+       (struct bidi_it): New member `string'.  Make flag members be 1-bit
+       fields, and put them last in the struct.
+       (compute_display_string_pos, compute_display_string_end): Update
+       prototypes.
+
+2011-06-04  Eli Zaretskii  <eliz@gnu.org>
+
+       * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
+
+2011-06-03  Eli Zaretskii  <eliz@gnu.org>
+
+       * bidi.c (bidi_fetch_char_advance): Remove unused and
+       unimplemented function.
+
 2011-05-28  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (set_cursor_from_row): Set start and stop points