emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 92289ce: Improve results of 'upcase' for characters


From: Eli Zaretskii
Subject: [Emacs-diffs] master 92289ce: Improve results of 'upcase' for characters with title-case
Date: Thu, 23 Jun 2016 19:24:49 +0000 (UTC)

branch: master
commit 92289cec7c460a2e7042bf0a450b86bbaac601d5
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Improve results of 'upcase' for characters with title-case
    
    * lisp/international/characters.el (standard-case-table): Swap the
    order of some lines, to have 'upcase' return the upper-case
    variant, not the title-case, for some characters whose lower-case
    map to the same codepoints.  (Bug#23833)
---
 lisp/international/characters.el |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index 371f698..ad9432c 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -623,16 +623,21 @@ with L, LRE, or LRO Unicode bidi character type.")
   (set-case-syntax-pair ?Ʊ ?ʊ tbl)
   (set-case-syntax-pair ?Ʋ ?ʋ tbl)
   (set-case-syntax-pair ?Ʒ ?ʒ tbl)
-  (set-case-syntax-pair ?DŽ ?dž tbl)
+  ;; The order of the next 6 lines is important, since we want
+  ;; upcase of dž return DŽ, not Dž, and the same for the rest.
   (set-case-syntax-pair ?Dž ?dž tbl)
-  (set-case-syntax-pair ?LJ ?lj tbl)
+  (set-case-syntax-pair ?DŽ ?dž tbl)
   (set-case-syntax-pair ?Lj ?lj tbl)
-  (set-case-syntax-pair ?NJ ?nj tbl)
+  (set-case-syntax-pair ?LJ ?lj tbl)
   (set-case-syntax-pair ?Nj ?nj tbl)
+  (set-case-syntax-pair ?NJ ?nj tbl)
 
   ;; 01F0; F; 006A 030C; # LATIN SMALL LETTER J WITH CARON
-  (set-case-syntax-pair ?DZ ?dz tbl)
+
+  ;; The order of the next two lines is important, since we want
+  ;; upcase of dz return DZ, not Dz.
   (set-case-syntax-pair ?Dz ?dz tbl)
+  (set-case-syntax-pair ?DZ ?dz tbl)
   (set-case-syntax-pair ?Ƕ ?ƕ tbl)
   (set-case-syntax-pair ?Ƿ ?ƿ tbl)
   (set-case-syntax-pair ?Ⱥ ?ⱥ tbl)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]