Fix Arabic composition rules

* lisp/language/misc-lang.el (composition-function-table): Reorder
Arabic composition rules in descending order of lookback.

* src/composite.c (syms_of_composite): Document the order of rules
in 'composition-function-table'.
This commit is contained in:
Eli Zaretskii 2020-06-02 20:44:59 +03:00
parent 9afcf2bd39
commit 22b2e9c901
2 changed files with 6 additions and 5 deletions

View file

@ -136,10 +136,10 @@ thin (i.e. 1-dot width) space."
(set-char-table-range
composition-function-table
'(#x600 . #x74F)
(list (vector "[\u0600-\u074F\u200C\u200D]+" 0
'arabic-shape-gstring)
(vector "[\u200C\u200D][\u0600-\u074F\u200C\u200D]+" 1
'arabic-shape-gstring)))
(list (vector "[\u200C\u200D][\u0600-\u074F\u200C\u200D]+"
1 'arabic-shape-gstring)
(vector "[\u0600-\u074F\u200C\u200D]+"
0 'arabic-shape-gstring)))
(provide 'misc-lang)

View file

@ -1987,7 +1987,8 @@ preceding and/or following characters, this char-table contains
a function to call to compose that character.
The element at index C in the table, if non-nil, is a list of
composition rules of this form: ([PATTERN PREV-CHARS FUNC] ...)
composition rules of the form ([PATTERN PREV-CHARS FUNC] ...);
they must be in the descending order of PREV-CHARS values.
PATTERN is a regular expression which C and the surrounding
characters must match.