Implement special sigma casing rule (bug#24603)
commitc1fa07222e9c76964d1261c31b50f1e399554fa2
authorMichal Nazarewicz <mina86@mina86.com>
Sun, 18 Sep 2016 22:52:47 +0000 (19 00:52 +0200)
committerMichal Nazarewicz <mina86@mina86.com>
Thu, 6 Apr 2017 18:54:58 +0000 (6 20:54 +0200)
treed1d48a5fd44b2d2abd049a70d17984a76c022c4f
parentb3b9b258c4026baa1cad3f2e617f1a637fc8d205
Implement special sigma casing rule  (bug#24603)

In Greek, a sigma character has two lower case forms which depend on
their position in the word.  Implement logic determining it.

* src/casefiddle.c (struct casing_context, case_character_impl): Don’t
assume inword is true when flag is CASE_UP and false when flag is
CASE_DOWN.  For final sigma detection we need this information tracked
reliably;.
(CAPITAL_SIGMA, SMALL_SIGMA, SMALL_FINAL_SIGMA): New macros defining
Unicode code point of different forms of sigma letter.
(case_character): Implement support for final sigma casing.
(do_casify_multibyte_string, do_casify_multibyte_region): Update after
changes to case_character.

* test/src/casefiddle-tests.el (casefiddle-tests-casing): Add test
cases for final sigma.
etc/NEWS
src/casefiddle.c
test/src/casefiddle-tests.el