]> code.delx.au - gnu-emacs/blob - src/ChangeLog.bidi
Retrospective commit from 2009-11-14.
[gnu-emacs] / src / ChangeLog.bidi
1 2009-11-14 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (init_iterator, text_outside_line_unchanged_p)
4 (try_window_id): Rename paragraph_direction to
5 bidi_paragraph_direction.
6 (set_cursor_from_row): Handle integer values of `cursor' property
7 on display strings.
8
9 * buffer.c (init_buffer_once, syms_of_buffer): Rename
10 paragraph_direction to bidi_paragraph_direction.
11
12 * buffer.h (struct buffer): Rename paragraph_direction to
13 bidi_paragraph_direction.
14
15 2009-11-07 Eli Zaretskii <eliz@gnu.org>
16
17 * bidi.c (bidi_paragraph_init): Don't overstep end of buffer.
18 Treat end of buffer as a NEUTRAL_B character.
19 (bidi_resolve_explicit): Don't special-case ZV when bidi_it->type
20 is NEUTRAL_B, since bidi_set_paragraph_end no longer sets the
21 new_paragraph flag.
22
23 2009-10-31 Eli Zaretskii <eliz@gnu.org>
24
25 * xdisp.c (display_line): Always extend reversed_p rows to the end
26 of line.
27 (set_cursor_from_row): In R2L rows that don't display text, put
28 the cursor on the rightmost glyph.
29
30 2009-10-24 Eli Zaretskii <eliz@gnu.org>
31
32 * xdisp.c (set_cursor_from_row): Fix off-by-one error when
33 skipping over non-character glyphs at end of a reversed row.
34
35 * dispextern.h (struct glyph): The `resolved_level' member needs
36 only 5 bits, not 6. The `bidi_type' member needs only 3 bits.
37 (bidi_type_t): Rearrange so that types that can appear in the
38 resolved type are at the beginning and have values less than 8.
39
40 2009-10-23 Eli Zaretskii <eliz@gnu.org>
41
42 * bidi.c: Include setjmp.h.
43
44 2009-10-17 Eli Zaretskii <eliz@gnu.org>
45
46 * dispextern.h (struct glyph): New members resolved_level and
47 bidi_type.
48
49 * xdisp.c (append_glyph, append_composite_glyph)
50 (produce_image_glyph, append_stretch_glyph): Set them.
51
52 * term.c (append_glyph): Ditto.
53
54 * xdisp.c (display_line, next_element_from_buffer): Set the glyph
55 row's reversed_p flag if the paragraph base direction is odd.
56 (extend_face_to_end_of_line): Don't reverse the glyphs here.
57
58 * term.c (append_glyph): Reverse glyphs here.
59
60 * bidi.c (bidi_get_next_char_visually): Don't exit early when at
61 ZV.
62 (bidi_paragraph_init): Don't step over a newline if at BEGV.
63
64 2009-10-16 Eli Zaretskii <eliz@gnu.org>
65
66 * bidi.c (bidi_paragraph_init): Handle empty buffers.
67
68 2009-10-10 Eli Zaretskii <eliz@gnu.org>
69
70 * xdisp.c (set_cursor_from_row): Skip over glyphs near end of row
71 with integer OBJECT even if their CHARPOS is zero.
72
73 * bidi.c (bidi_cache_iterator_state): Don't cache NEW_PARAGRAPH.
74 Abort if someone tries to add a cached state whose position is not
75 the immediate successor to that of the last cached state.
76 (bidi_paragraph_init): Don't bail out too early after a reseat.
77
78 2009-10-09 Eli Zaretskii <eliz@gnu.org>
79
80 * xdisp.c (text_outside_line_unchanged_p, try_window_id): Disable
81 optimizations if we are reordering bidirectional text and the
82 paragraph direction can be affected by the change.
83
84 2009-10-08 Eli Zaretskii <eliz@gnu.org>
85
86 * xdisp.c (string_buffer_position_lim): New function.
87 (string_buffer_position): Most of code moved to
88 string_buffer_position_lim. Last argument and return value are
89 now EMACS_INT; all callers changed.
90 (set_cursor_from_row): Rewritten to support bidirectional text and
91 reversed glyph rows.
92
93 dispextern.h <string_buffer_position>: Update prototype.
94
95 2009-10-07 Eli Zaretskii <eliz@gnu.org>
96
97 * bidi.c (bidi_paragraph_init): Fix initialization of POS.
98
99 * dispextern.h (struct glyph_row): New member reversed_p.
100
101 2009-10-06 Eli Zaretskii <eliz@gnu.org>
102
103 * buffer.c (syms_of_buffer): Remove DEFVAR_LISP_NOPRO for
104 default-direction-reversed, default-bidi-display-reordering, and
105 default-paragraph-direction.
106
107 2009-10-05 Eli Zaretskii <eliz@gnu.org>
108
109 * buffer.h (struct buffer): New member paragraph_direction.
110 * buffer.c (init_buffer_once): Initialize it.
111 (syms_of_buffer): Declare Lisp variables
112 default-paragraph-direction and paragraph-direction.
113
114 * dispextern.h (struct it): New member paragraph_embedding.
115 * xdisp.c (init_iterator): Initialize it from the buffer's value
116 of paragraph-direction.
117 <Qright_to_left, Qleft_to_right>: New variables.
118 (syms_of_xdisp): Initialize and staticpro them.
119 (set_iterator_to_next, next_element_from_buffer): Use the value of
120 paragraph_embedding to determine the paragraph direction.
121
122 * bidi.c (bidi_line_init): Fix second argument to
123 bidi_set_sor_type.
124 (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
125 (bidi_get_next_char_visually): Record the last character of the
126 separator in separator_limit, not the character after that.
127 (bidi_find_paragraph_start): Accept character and byte positions
128 instead of the whole iterator stricture. All callers changed.
129
130 2009-10-04 Eli Zaretskii <eliz@gnu.org>
131
132 * bidi.c (bidi_at_paragraph_end): Check for paragraph-start if
133 paragraph-separate failed to match. Return the length of the
134 matched separator.
135 (bidi_line_init): New function.
136 (bidi_paragraph_init): Use bidi_line_init. Do nothing if in the
137 middle of a paragraph-separate sequence. Don't override existing
138 paragraph direction if no strong characters found in this
139 paragraph. Set separator_limit according to what
140 bidi_at_paragraph_end returns. Reset new_paragraph flag when a
141 new paragraph is found.
142 (bidi_init_it): Reset separator_limit.
143
144 * dispextern.h (struct bidi_it): New member separator_limit.
145
146 * bidi.c (bidi_find_paragraph_start): Return the byte position of
147 the paragraph beginning.
148
149 * xdisp.c (set_iterator_to_next): Call bidi_paragraph_init if the
150 new_paragraph flag is set in the bidi iterator.
151
152 * bidi.c (bidi_at_paragraph_end, bidi_find_paragraph_start): Use
153 the buffer-local value of paragraph-start and paragraph-separate.
154
155 2009-10-03 Eli Zaretskii <eliz@gnu.org>
156
157 * bidi.c (bidi_set_paragraph_end): Don't set the new_paragraph
158 flag in the iterator.
159 (bidi_init_it): Set the new_paragraph flag.
160 (bidi_at_paragraph_end): Arguments are now character and byte
161 position of the next character. All callers changed.
162 (bidi_resolve_explicit): Don't call bidi_at_paragraph_end, and
163 don't behave as if at paragraph end if it returns true.
164 (bidi_get_next_char_visually): Don't call bidi_paragraph_init if
165 new_paragraph flags is set. Set new_paragraph flag when at end of
166 a paragraph.
167 <fallback_paragraph_start_re, fallback_paragraph_separate_re>: New
168 variables.
169 <Qparagraph_start, Qparagraph_separate>: New variables.
170 (bidi_initialize): Initialize and staticpro them.
171
172 * dispextern.h <struct bidi_it>: New element paragraph_dir. Make
173 positional elements EMACS_INT.
174
175 * bidi.c <bidi_overriding_paragraph_direction>: Delete.
176
177 2009-09-28 Eli Zaretskii <eliz@gnu.org>
178
179 * bidi.c (bidi_init_it): Initialize charpos, bytepos, and
180 first_elt before calling bidi_set_paragraph_end.
181 (bidi_resolve_explicit): Don't call bidi_set_paragraph_end at
182 EOB.
183 (bidi_at_paragraph_end): Don't set new_paragraph flag at EOB.
184 (bidi_get_type): Accept an additional argument OVERRIDE, per UAX#9
185 "Explicit Overrides". All callers changed.
186
187 2009-09-27 Eli Zaretskii <eliz@gnu.org>
188
189 * xdisp.c (next_element_from_buffer): If called not at line
190 beginning, start bidi iteration from line beginning.
191
192 * bidi.c (bidi_paragraph_init): Use
193 bidi_overriding_paragraph_direction instead of a literal zero.
194 (bidi_initialize): Fix some character types, per Unicode 5.x.
195 (bidi_get_type): Abort if called with invalid character code.
196
197 * dispextern.h: Add prototype of bidi_mirror_char.
198
199 * xdisp.c (get_next_display_element): Mirror characters whose
200 resolved type is STRONG_R.
201
202 2009-09-26 Eli Zaretskii <eliz@gnu.org>
203
204 * bidi.c (bidi_paragraph_init): Don't set bidi_it->ch_len. Abort
205 if called not at beginning of a new paragraph.
206 (bidi_get_next_char_visually): Prepare and use a sentinel iterator
207 state when first_elt flag is set.
208
209 * dispextern.h (struct bidi_it): New struct member first_elt.
210
211 * bidi.c (bidi_init_it): Initialize bidi_it->first_elt.
212 (bidi_copy_it): Don't copy the first_elt flag.
213
214 * xdisp.c (reseat_1): Initialize bidi_it.first_elt. Move bidi
215 scan start code from here...
216 (next_element_from_buffer): ...to here. Use bidi_it.first_elt
217 flag.
218
219 2009-09-20 Eli Zaretskii <eliz@gnu.org>
220
221 * xdisp.c (reseat_1): Handle position < BEGV.
222
223 * bidi.c (bidi_paragraph_init): Set bidi_it->ch_len. Handle ZV.
224 (bidi_init_it): Don't initialize bidi_it->ch_len.
225 (bidi_resolve_explicit_1): Abort if bidi_it->ch_len was not
226 initialized.
227 (bidi_at_paragraph_end, bidi_resolve_explicit_1)
228 (bidi_resolve_weak, bidi_level_of_next_char): Handle bytepos at
229 ZV_BYTE.
230 (bidi_resolve_explicit_1): Handle position < BEGV.
231
232 2009-09-19 Eli Zaretskii <eliz@gnu.org>
233
234 * xdisp.c (init_iterator): Call bidi_init_it. Set
235 bidi_it->bytepos if buffer position specified.
236 (reseat_1): Don't call bidi_init_it. Call bidi_paragraph_init
237 instead. Move back to preceding character before the call to
238 bidi_get_next_char_visually.
239
240 * bidi.c: Remove all STANDALONE parts.
241 (bidi_init_it): Init bidi_it->charpos and bidi_it->bytepos to -1.
242 Don't call bidi_paragraph_init. Change arguments.
243 (bidi_paragraph_init): Remove code for negative pos.
244
245 * dispextern.h <bidi_it>: Rename orig_type to type_after_w1 and
246 pristine_type to orig_type.
247
248 2009-09-12 Eli Zaretskii <eliz@gnu.org>
249
250 * dispnew.c (direct_output_for_insert): Give up if we are
251 reordering bidirectional text.
252
253 * dispextern.h (IT_STACK_SIZE): Enlarge to 5.
254
255 * xdisp.c (display_line): Set row->end and it->start for the next
256 row to the next character in logical order. If we are reordering
257 bidi text, push and pop the iterator before and after momentarily
258 iterating in logical order.
259
260 2009-09-11 Eli Zaretskii <eliz@gnu.org>
261
262 Note: The following changes were undone on 2009-09-12.
263
264 * xdisp.c (set_iterator_to_next, reseat, reseat_1)
265 (reseat_at_next_visible_line_start): Accept additional argument
266 force_logical_p; all callers changed. If force_logical_p is
267 non-zero, force iteration in buffer's logical order even in bidi
268 buffers.
269
270 * dispnew.c (direct_output_for_insert): Call set_iterator_to_next
271 with additional argument zero.
272
273 * dispextern.h (set_iterator_to_next): Now accepts an additional
274 argument.
275
276 2009-08-29 Eli Zaretskii <eliz@gnu.org>
277
278 * xdisp.c (set_cursor_from_row): Don't assume glyph->charpos
279 increments linearly.
280 (try_window_reusing_current_matrix): Don't assume glyph->charpos
281 increments linearly.
282
283 2009-08-28 Eli Zaretskii <eliz@gnu.org>
284
285 * bidi.c <bidi_overriding_paragraph_direction>: Default to L2R,
286 for now.
287
288 2009-08-22 Eli Zaretskii <eliz@gnu.org>
289
290 * bidi.c (bidi_initialize): staticpro bidi_char_table.
291 (bidi_check_type): New function.
292 (bidi_cache_iterator_state, bidi_remember_char)
293 (bidi_resolve_explicit_1, bidi_resolve_explicit)
294 (bidi_resolve_weak, bidi_resolve_neutral)
295 (bidi_level_of_next_char): Use it to validate the bidi type
296 assigned to the iterator.
297
298 2009-08-15 Eli Zaretskii <eliz@gnu.org>
299
300 * bidi.c (bidi_initialize): Fix initialization of bidi_type_table.
301
302 * xdisp.c (set_iterator_to_next): Fix position setting after call
303 to bidi_get_next_char_visually.
304
305 2005-12-03 Eli Zaretskii <eliz@gnu.org>
306
307 * bidi.c: Include stdio.h unconditionally. Fix and elaborate
308 commentary. Add Copyright blurb.
309
310 2004-03-08 Kenichi Handa <handa@m17n.org>
311
312 * xdisp.c (reseat_1): Call bidi_init_it with a previous position.
313
314 * bidi.c (bidi_init_it): Set bidi_it->ch_len even if POS > 0.
315
316 2004-03-04 Kenichi Handa <handa@m17n.org>
317
318 The following changes are to support bidirectional text display.
319
320 * Makefile.in (obj): Include bidi.o.
321 (bidi.o): New target.
322
323 * bidi.c: New file.
324
325 * buffer.h (struct buffer): New member bidi_display_reordering.
326
327 * buffer.c (init_buffer_once): Initialize bidi_display_reordering.
328 (syms_of_buffer): Declarations of Lisp variables
329 default-bidi-display-reordering and bidi-display-reordering.
330
331 * dispextern.h (BIDI_MAXLEVEL): New macro.
332 (bidi_type_t, bidi_dir_t): New types.
333 (bidi_saved_info, bidi_stack, bidi_it): New structs.
334 (struct it): New members bidi_p and bidi_it.
335 (bidi_init_it): Extern it.
336 (bidi_get_next_char_visually): Extern it.
337
338 * dispnew.c (direct_output_forward_char): Give up if we need bidi
339 processing or buffer's direction is right-to-left.
340
341 * xdisp.c (init_iterator): Initialize it->bidi_p.
342 (reseat_1): Cal bidi_init_it and bidi_get_next_char_visually if
343 necessary.
344 (set_iterator_to_next): Cal bidi_get_next_char_visually if
345 necessary.
346
347
348 ;; Local Variables:
349 ;; coding: utf-8
350 ;; add-log-time-zone-rule: t
351 ;; End:
352
353 Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
354
355 This file is part of GNU Emacs.
356
357 GNU Emacs is free software: you can redistribute it and/or modify
358 it under the terms of the GNU General Public License as published by
359 the Free Software Foundation, either version 3 of the License, or
360 (at your option) any later version.
361
362 GNU Emacs is distributed in the hope that it will be useful,
363 but WITHOUT ANY WARRANTY; without even the implied warranty of
364 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
365 GNU General Public License for more details.
366
367 You should have received a copy of the GNU General Public License
368 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.