aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2009-07-24 07:56:19 +0000
committerKenichi Handa2009-07-24 07:56:19 +0000
commit796f8b2fe6f302224ea20b8ac3ae23a0309044e7 (patch)
treeca32f6c682f3d832e95e978b0eacebdb4405584c
parentba83b7b62f12b0305585261f7b08bf1a699aa86b (diff)
downloademacs-796f8b2fe6f302224ea20b8ac3ae23a0309044e7.tar.gz
emacs-796f8b2fe6f302224ea20b8ac3ae23a0309044e7.zip
Fix setting of category ?C, ?|, ?K,
and ?H. Fix setting of case for Latin Extended and Greek Extended. (build-unicode-category-table): Fix range checks.
-rw-r--r--lisp/international/characters.el41
1 files changed, 23 insertions, 18 deletions
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index a89ce7d63d5..ecd369cda24 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -139,10 +139,9 @@ Combining diacritic or mark (Unicode General Category M)")
139(modify-category-entry '(#xF900 . #xFAFF) ?C) 139(modify-category-entry '(#xF900 . #xFAFF) ?C)
140(modify-category-entry '(#xF900 . #xFAFF) ?c) 140(modify-category-entry '(#xF900 . #xFAFF) ?c)
141(modify-category-entry '(#xF900 . #xFAFF) ?|) 141(modify-category-entry '(#xF900 . #xFAFF) ?|)
142(modify-category-entry '(#x20000 . #x2AFFF) ?|) 142(modify-category-entry '(#x20000 . #x2FFFF) ?|)
143(modify-category-entry '(#x2F800 . #x2FFFF) ?|) 143(modify-category-entry '(#x20000 . #x2FFFF) ?C)
144(modify-category-entry '(#x20000 . #x2AFFF) ?C) 144(modify-category-entry '(#x20000 . #x2FFFF) ?c)
145(modify-category-entry '(#x2F800 . #x2FFFF) ?C)
146 145
147 146
148;; Chinese character set (GB2312) 147;; Chinese character set (GB2312)
@@ -195,17 +194,18 @@ Combining diacritic or mark (Unicode General Category M)")
195 (modify-category-entry range ?\|)) 194 (modify-category-entry range ?\|))
196 195
197;; Katakana block 196;; Katakana block
198(let ((range '(#x30a0 . #x30ff))) 197(modify-category-entry '(#x3099 . #x309C) ?K)
199 ;; ?K is double width, ?k isn't specified 198(modify-category-entry '(#x30A0 . #x30FF) ?K)
200 (modify-category-entry range ?K) 199(modify-category-entry '(#x30A0 . #x30FA) ?\|))
201 (modify-category-entry range ?\|)) 200(modify-category-entry #x30FF ?\|)
202 201
203;; Hiragana block 202;; Hiragana block
204(let ((range '(#x3040 . #x309d))) 203(modify-category-entry '(#x3040 . #x309F) ?H)
205 ;; ?H is actually defined to be double width 204(modify-category-entry '(#x3040 . #x3096) ?\|)
206 ;;(modify-category-entry range ?H) 205(modify-category-entry #x309F ?\|)
207 (modify-category-entry range ?\|) 206(modify-category-entry #x30A0 ?H)
208 ) 207(modify-category-entry #x30FC ?H)
208
209 209
210;; JISX0208 210;; JISX0208
211(map-charset-chars #'modify-syntax-entry 'japanese-jisx0208 "_" #x2121 #x227E) 211(map-charset-chars #'modify-syntax-entry 'japanese-jisx0208 "_" #x2121 #x227E)
@@ -527,7 +527,8 @@ Combining diacritic or mark (Unicode General Category M)")
527 (#x014a . #x0177) 527 (#x014a . #x0177)
528 (#x0179 . #x017E) 528 (#x0179 . #x017E)
529 (#x0182 . #x0185) 529 (#x0182 . #x0185)
530 (#x0187 . #x018C) 530 (#x0187 . #x0188)
531 (#x018B . #x018C)
531 (#x0191 . #x0192) 532 (#x0191 . #x0192)
532 (#x0198 . #x0199) 533 (#x0198 . #x0199)
533 (#x01A0 . #x01A5) 534 (#x01A0 . #x01A5)
@@ -550,6 +551,9 @@ Combining diacritic or mark (Unicode General Category M)")
550 (set-case-syntax-pair from (1+ from) tbl) 551 (set-case-syntax-pair from (1+ from) tbl)
551 (setq from (+ from 2)))))) 552 (setq from (+ from 2))))))
552 553
554 (set-case-syntax-pair #x189 #x256 tbl)
555 (set-case-syntax-pair #x18A #x257 tbl)
556
553 ;; In some languages, such as Turkish, U+0049 LATIN CAPITAL LETTER I 557 ;; In some languages, such as Turkish, U+0049 LATIN CAPITAL LETTER I
554 ;; and U+0131 LATIN SMALL LETTER DOTLESS I make a case pair, and so 558 ;; and U+0131 LATIN SMALL LETTER DOTLESS I make a case pair, and so
555 ;; do U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE and U+0069 LATIN 559 ;; do U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE and U+0069 LATIN
@@ -616,8 +620,9 @@ Combining diacritic or mark (Unicode General Category M)")
616 (while (<= c #x1fff) 620 (while (<= c #x1fff)
617 (and (<= (logand c #x000f) 7) 621 (and (<= (logand c #x000f) 7)
618 (<= c #x1fa7) 622 (<= c #x1fa7)
619 (not (memq c '(#x1f50 #x1f52 #x1f54 #x1f56))) 623 (not (memq c '(#x1f16 #x1f17 #x1f56 #x1f57
620 (/= (logand c #x00f0) 7) 624 #x1f50 #x1f52 #x1f54 #x1f56)))
625 (/= (logand c #x00f0) #x70)
621 (set-case-syntax-pair (+ c 8) c tbl)) 626 (set-case-syntax-pair (+ c 8) c tbl))
622 (setq c (1+ c))) 627 (setq c (1+ c)))
623 (set-case-syntax-pair ?Ᾰ ?ᾰ tbl) 628 (set-case-syntax-pair ?Ᾰ ?ᾰ tbl)
@@ -1202,8 +1207,8 @@ Setup char-width-table appropriate for non-CJK language environment."
1202 (let ((table (make-char-table 'unicode-category-table nil))) 1207 (let ((table (make-char-table 'unicode-category-table nil)))
1203 (dotimes (i #x110000) 1208 (dotimes (i #x110000)
1204 (if (or (< i #xD800) 1209 (if (or (< i #xD800)
1205 (and (> i #xF900) (< i #x30000)) 1210 (and (>= i #xF900) (< i #x30000))
1206 (and (> i #xE0000) (< i #xE0200))) 1211 (and (>= i #xE0000) (< i #xE0200)))
1207 (aset table i (get-char-code-property i 'general-category)))) 1212 (aset table i (get-char-code-property i 'general-category))))
1208 (set-char-table-range table '(#xE000 . #xF8FF) 'Co) 1213 (set-char-table-range table '(#xE000 . #xF8FF) 'Co)
1209 (set-char-table-range table '(#xF0000 . #xFFFFD) 'Co) 1214 (set-char-table-range table '(#xF0000 . #xFFFFD) 'Co)