diff options
| author | Eli Zaretskii | 2023-08-05 17:55:56 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2023-08-05 17:55:56 +0300 |
| commit | a06a2950e168dddcbf1c3cd14697875d93a4f9ff (patch) | |
| tree | af9e6fc2c54a97ce6996eb731f5abae810e93770 /src | |
| parent | 60e5f212182ca2f41f89a4315075e38433bc8ac0 (diff) | |
| download | emacs-a06a2950e168dddcbf1c3cd14697875d93a4f9ff.tar.gz emacs-a06a2950e168dddcbf1c3cd14697875d93a4f9ff.zip | |
Allow user control on char-width of "ambiguous" characters
* src/character.c (syms_of_character) <ambiguous-width-chars>: New
char-table.
* lisp/international/characters.el (ambiguous-width-chars): Fill
the table.
(update-cjk-ambiguous-char-widths): New function.
(cjk-ambiguous-chars-are-wide): New defcustom, uses
'update-cjk-ambiguous-char-widths' as its :set function.
(use-cjk-char-width-table): Obey 'cjk-ambiguous-chars-are-wide' by
adding another child char-table for ambiguous-width characters,
where the width is set according to the option.
* lisp/language/chinese.el ("Chinese-GB", "Chinese-BIG5")
("Chinese-CNS", "Chinese-EUC-TW", "Chinese-GBK"):
* lisp/language/japanese.el ("Japanese"):
* lisp/language/korean.el ("Korean"): Add new language-info slot
'cjk-locale-symbol'.
Bug#64420
Diffstat (limited to 'src')
| -rw-r--r-- | src/character.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/character.c b/src/character.c index f4164360f21..2118b20a7c7 100644 --- a/src/character.c +++ b/src/character.c | |||
| @@ -1117,6 +1117,14 @@ A char-table for width (columns) of each character. */); | |||
| 1117 | char_table_set_range (Vchar_width_table, MAX_5_BYTE_CHAR + 1, MAX_CHAR, | 1117 | char_table_set_range (Vchar_width_table, MAX_5_BYTE_CHAR + 1, MAX_CHAR, |
| 1118 | make_fixnum (4)); | 1118 | make_fixnum (4)); |
| 1119 | 1119 | ||
| 1120 | DEFVAR_LISP ("ambiguous-width-chars", Vambiguous_width_chars, | ||
| 1121 | doc: /* | ||
| 1122 | A char-table for characters whose width (columns) can be 1 or 2. | ||
| 1123 | |||
| 1124 | The actual width depends on the language-environment and on the | ||
| 1125 | value of `cjk-ambiguous-chars-are-wide'. */); | ||
| 1126 | Vambiguous_width_chars = Fmake_char_table (Qnil, Qnil); | ||
| 1127 | |||
| 1120 | DEFVAR_LISP ("printable-chars", Vprintable_chars, | 1128 | DEFVAR_LISP ("printable-chars", Vprintable_chars, |
| 1121 | doc: /* A char-table for each printable character. */); | 1129 | doc: /* A char-table for each printable character. */); |
| 1122 | Vprintable_chars = Fmake_char_table (Qnil, Qnil); | 1130 | Vprintable_chars = Fmake_char_table (Qnil, Qnil); |