diff options
| author | Helmut Eller | 2026-04-04 20:59:46 +0200 |
|---|---|---|
| committer | Helmut Eller | 2026-04-04 20:59:46 +0200 |
| commit | 6eec001187e8551f32b6498e6dc60cdc58c2e515 (patch) | |
| tree | 13233de9f0a05ef86a51500e8b1870b75ff20c81 /src/bidi.c | |
| parent | e4ea27119e79012f9d651cb61d1115589d91ef39 (diff) | |
| parent | 01a9d78a7e4c7d7fa5b799e4fdc2caf77a012734 (diff) | |
| download | emacs-feature/igc3.tar.gz emacs-feature/igc3.zip | |
Merge branch 'master' into feature/igc3feature/igc3
Diffstat (limited to 'src/bidi.c')
| -rw-r--r-- | src/bidi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bidi.c b/src/bidi.c index f4bca186177..9cf53787c4b 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -367,6 +367,8 @@ bidi_isolate_fmt_char (bidi_type_t ch_type) | |||
| 367 | return (ch_type == LRI || ch_type == RLI || ch_type == PDI || ch_type == FSI); | 367 | return (ch_type == LRI || ch_type == RLI || ch_type == PDI || ch_type == FSI); |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | static void bidi_initialize (void); | ||
| 371 | |||
| 370 | /* Return the mirrored character of C, if it has one. If C has no | 372 | /* Return the mirrored character of C, if it has one. If C has no |
| 371 | mirrored counterpart, return C. | 373 | mirrored counterpart, return C. |
| 372 | Note: The conditions in UAX#9 clause L4 regarding the surrounding | 374 | Note: The conditions in UAX#9 clause L4 regarding the surrounding |
| @@ -381,6 +383,14 @@ bidi_mirror_char (int c) | |||
| 381 | if (c < 0 || c > MAX_CHAR) | 383 | if (c < 0 || c > MAX_CHAR) |
| 382 | emacs_abort (); | 384 | emacs_abort (); |
| 383 | 385 | ||
| 386 | /* We can be called at the very beginning of init_iterator, via | ||
| 387 | produce_special_glyphs, and the first such call in a session might | ||
| 388 | happen when the bidi-mirroring table was not yet initialized. Make | ||
| 389 | sure we do this now. */ | ||
| 390 | if (!CHAR_TABLE_P (bidi_mirror_table) | ||
| 391 | && !bidi_initialized) | ||
| 392 | bidi_initialize (); | ||
| 393 | |||
| 384 | val = CHAR_TABLE_REF (bidi_mirror_table, c); | 394 | val = CHAR_TABLE_REF (bidi_mirror_table, c); |
| 385 | if (FIXNUMP (val)) | 395 | if (FIXNUMP (val)) |
| 386 | { | 396 | { |