/[emacs]/emacs/lisp/international/characters.el
ViewVC logotype

Diff of /emacs/lisp/international/characters.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.35.2.9 by handa, Mon Jun 3 23:16:23 2002 UTC revision 1.35.2.10 by fx, Thu Jun 6 11:34:24 2002 UTC
# Line 112  Line 112 
112                    arabic-1-column                    arabic-1-column
113                    arabic-2-column)))                    arabic-2-column)))
114    (while charsets    (while charsets
 ;;     (modify-syntax-entry (make-char (car charsets)) "w")  
115      (map-charset-chars #'modify-category-entry (car charsets) ?b)      (map-charset-chars #'modify-category-entry (car charsets) ?b)
116      (setq charsets (cdr charsets))))      (setq charsets (cdr charsets))))
117  (modify-category-entry '(#x600 . #x6ff) ?b)  (modify-category-entry '(#x600 . #x6ff) ?b)
# Line 121  Line 120 
120    
121  ;; Chinese character set (GB2312)  ;; Chinese character set (GB2312)
122    
123  ;; (modify-syntax-entry (make-char 'chinese-gb2312) "w")  (modify-syntax-entry (cons (make-char 'chinese-gb2312 33 33)
124  ;; (modify-syntax-entry (make-char 'chinese-gb2312 33) "_")                             (make-char 'chinese-gb2312 33 126))
125  ;; (modify-syntax-entry (make-char 'chinese-gb2312 34) "_")                       "_")
126  ;; (modify-syntax-entry (make-char 'chinese-gb2312 41) "_")  (modify-syntax-entry (cons (make-char 'chinese-gb2312 34 33)
127                               (make-char 'chinese-gb2312 34 126))
128                         "_")
129    (modify-syntax-entry (cons (make-char 'chinese-gb2312 41 33)
130                               (make-char 'chinese-gb2312 41 126))
131                         "_")
132    (modify-category-entry (cons (make-char 'chinese-gb2312 35 33)
133                                 (make-char 'chinese-gb2312 35 126))
134                           ?A)
135    (modify-category-entry (cons (make-char 'chinese-gb2312 36 33)
136                                 (make-char 'chinese-gb2312 36 126))
137                           ?H)
138    (modify-category-entry (cons (make-char 'chinese-gb2312 37 33)
139                                 (make-char 'chinese-gb2312 37 126))
140                           ?K)
141    (modify-category-entry (cons (make-char 'chinese-gb2312 38 33)
142                                 (make-char 'chinese-gb2312 38 126))
143                           ?G)
144    (modify-category-entry (cons (make-char 'chinese-gb2312 39 33)
145                                 (make-char 'chinese-gb2312 39 126))
146                           ?Y)
147  (modify-syntax-entry ?\〔 "(〕")  (modify-syntax-entry ?\〔 "(〕")
148  (modify-syntax-entry ?\〈 "(〉")  (modify-syntax-entry ?\〈 "(〉")
149  (modify-syntax-entry ?\《 "(》")  (modify-syntax-entry ?\《 "(》")
# Line 140  Line 159 
159  (modify-syntax-entry ?\〗 ")〖")  (modify-syntax-entry ?\〗 ")〖")
160  (modify-syntax-entry ?\】 ")【")  (modify-syntax-entry ?\】 ")【")
161    
162  ;; Fixme: should any Chinese stuff be re-instated?  (map-charset-chars #'modify-category-entry 'chinese-gb2312 ?c)
163    (map-charset-chars #'modify-category-entry 'chinese-gb2312 ?|)
164  ;; (modify-category-entry (make-char 'chinese-gb2312) ?c)  (let ((row 48))
165  ;; (modify-category-entry (make-char 'chinese-gb2312) ?\|)    (while (< row 127)
166  ;; (modify-category-entry (make-char 'chinese-gb2312 35) ?A)      (modify-category-entry (cons (make-char 'chinese-gb2312 row 33)
167  ;; (modify-category-entry (make-char 'chinese-gb2312 36) ?H)                                   (make-char 'chinese-gb2312 row 126))
168  ;; (modify-category-entry (make-char 'chinese-gb2312 37) ?K)                             ?C)
169  ;; (modify-category-entry (make-char 'chinese-gb2312 38) ?G)      (setq row (1+ row))))
 ;; (modify-category-entry (make-char 'chinese-gb2312 39) ?Y)  
 ;; (let ((row 48))  
 ;;   (while (< row 127)  
 ;;     (modify-category-entry (make-char 'chinese-gb2312 row) ?C)  
 ;;     (setq row (1+ row))))  
170    
171  ;; Chinese character set (BIG5)  ;; Chinese character set (BIG5)
172    
173  ;; (let ((generic-big5-1-char (make-char 'chinese-big5-1))  (map-charset-chars #'modify-category-entry 'chinese-big5-1 ?c)
174  ;;       (generic-big5-2-char (make-char 'chinese-big5-2)))  (map-charset-chars #'modify-category-entry 'chinese-big5-2 ?c)
175  ;;   (modify-syntax-entry generic-big5-1-char "w")  (map-charset-chars #'modify-category-entry 'chinese-big5-1 ?C)
176  ;;   (modify-syntax-entry generic-big5-2-char "w")  (map-charset-chars #'modify-category-entry 'chinese-big5-2 ?C)
177    (map-charset-chars #'modify-category-entry 'chinese-big5-1 ?|)
178  ;;   (modify-category-entry generic-big5-1-char ?c)  (map-charset-chars #'modify-category-entry 'chinese-big5-2 ?|)
 ;;   (modify-category-entry generic-big5-2-char ?c)  
   
 ;;   (modify-category-entry generic-big5-1-char ?C)  
 ;;   (modify-category-entry generic-big5-2-char ?C)  
   
 ;;   (modify-category-entry generic-big5-1-char ?\|)  
 ;;   (modify-category-entry generic-big5-2-char ?\|))  
   
179    
180  ;; Chinese character set (CNS11643)  ;; Chinese character set (CNS11643)
181    
182  ;; (let ((cns-list '(chinese-cns11643-1  (dolist (c '(chinese-cns11643-1 chinese-cns11643-2 chinese-cns11643-3
183  ;;                chinese-cns11643-2               chinese-cns11643-4 chinese-cns11643-5 chinese-cns11643-6
184  ;;                chinese-cns11643-3               chinese-cns11643-7))
185  ;;                chinese-cns11643-4    (map-charset-chars #'modify-category-entry c ?c)
186  ;;                chinese-cns11643-5    (map-charset-chars #'modify-category-entry c ?C)
187  ;;                chinese-cns11643-6    (map-charset-chars #'modify-category-entry c ?|))
 ;;                chinese-cns11643-7))  
 ;;       generic-char)  
 ;;   (while cns-list  
 ;;     (setq generic-char (make-char (car cns-list)))  
 ;;     (modify-syntax-entry generic-char "w")  
 ;;     (modify-category-entry generic-char ?c)  
 ;;     (modify-category-entry generic-char ?C)  
 ;;     (modify-category-entry generic-char ?|)  
 ;;     (setq cns-list (cdr cns-list))))  
188    
189  ;; Cyrillic character set (ISO-8859-5)  ;; Cyrillic character set (ISO-8859-5)
190    
# Line 240  Line 237 
237    (set-case-syntax-pair ?Ю ?ю tbl)    (set-case-syntax-pair ?Ю ?ю tbl)
238    (set-case-syntax-pair ?Я ?я tbl))    (set-case-syntax-pair ?Я ?я tbl))
239    
 ;; Devanagari character set  
   
 ;;; Commented out since the categories appear not to be used anywhere  
 ;;; and word syntax is the default.  
 ;; (let ((deflist       '(;; chars      syntax  category  
 ;;                (""       "w"     ?7) ; vowel-modifying diacritical mark  
 ;;                                          ; chandrabindu, anuswar, visarga  
 ;;                ("-"  "w"     ?1) ; independent vowel  
 ;;                ("-"  "w"     ?0) ; consonant  
 ;;                ("-"  "w"     ?8) ; matra  
 ;;                ("-"  "w"     ?6) ; digit  
 ;;                ;; Unicode equivalents  
 ;;                ("ँंः"  "w"     ?7) ; vowel-modifying diacritical mark  
 ;;                                          ; chandrabindu, anuswar, visarga  
 ;;                ("अ-ऍ"    "w"     ?1) ; independent vowel  
 ;;                ("क-ह"    "w"     ?0) ; consonant  
 ;;                ("ा-ॉ"    "w"     ?8) ; matra  
 ;;                ("०-९"    "w"     ?6) ; digit  
 ;;                ))  
 ;;       elm chars len syntax category to ch i)  
 ;;   (while deflist  
 ;;     (setq elm (car deflist))  
 ;;     (setq chars (car elm)  
 ;;        len (length chars)  
 ;;        syntax (nth 1 elm)  
 ;;        category (nth 2 elm)  
 ;;        i 0)  
 ;;     (while (< i len)  
 ;;       (if (= (aref chars i) ?-)  
 ;;        (setq i (1+ i)  
 ;;              to (aref chars i))  
 ;;      (setq ch (aref chars i)  
 ;;            to ch))  
 ;;       (while (<= ch to)  
 ;;      (modify-syntax-entry ch syntax)  
 ;;      (modify-category-entry ch category)  
 ;;      (setq ch (1+ ch)))  
 ;;       (setq i (1+ i)))  
 ;;     (setq deflist (cdr deflist))))  
   
240  ;; Ethiopic character set  ;; Ethiopic character set
241    
242  (modify-category-entry '(#x1200 . #x137b) ?e)  (modify-category-entry '(#x1200 . #x137b) ?e)
# Line 293  Line 250 
250    
251  (modify-category-entry '(#x370 . #x3ff) ?g)  (modify-category-entry '(#x370 . #x3ff) ?g)
252    
 ;; (let ((c 182))  
 ;;   (while (< c 255)  
 ;;     (modify-syntax-entry (make-char 'greek-iso8859-7 c) "w")  
 ;;     (setq c (1+ c))))  
 ;; (modify-syntax-entry (make-char 'greek-iso8859-7 160) "w") ; NBSP  
 ;; (modify-syntax-entry ?· ".")  
 ;; (modify-syntax-entry ?» ".")  
 ;; (modify-syntax-entry ?½ ".")  
253  (let ((tbl (standard-case-table)))  (let ((tbl (standard-case-table)))
   ;; Fixme: non-letter syntax copied from latin-1, but that's dubious  
   ;; in several cases.  
   (set-case-syntax ?‘ "." tbl)  
   (set-case-syntax ?’ "." tbl)  
   (set-case-syntax ?¦ "." tbl)  
   (set-case-syntax ?¦ "_" tbl)  
   (set-case-syntax ?§ "." tbl)  
   (set-case-syntax ?© "_" tbl)  
   (set-case-syntax ?\« "." tbl)  
   (set-case-syntax ?¬ "_" tbl)  
   (set-case-syntax ?­ "_" tbl)  
   (set-case-syntax ?― "." tbl)  
   (set-case-syntax ?° "_" tbl)  
   (set-case-syntax ?± "_" tbl)  
 ;;  (set-case-syntax ?· "_" tbl)  
 ;;  (set-case-syntax ?½ "_" tbl)  
254    (set-case-syntax-pair ?Α ?α tbl)    (set-case-syntax-pair ?Α ?α tbl)
255    (set-case-syntax-pair ?Β ?β tbl)    (set-case-syntax-pair ?Β ?β tbl)
256    (set-case-syntax-pair ?Γ ?γ tbl)    (set-case-syntax-pair ?Γ ?γ tbl)
# Line 354  Line 287 
287    
288  ;; Hebrew character set (ISO-8859-8)  ;; Hebrew character set (ISO-8859-8)
289    
 (modify-category-entry '(#x590 . #x5f4) ?w)  
   
 ;; (modify-syntax-entry (make-char 'hebrew-iso8859-8 208) ".") ; PASEQ  
 ;; (modify-syntax-entry (make-char 'hebrew-iso8859-8 211) ".") ; SOF PASUQ  
290  (modify-syntax-entry #x5be ".") ; MAQAF  (modify-syntax-entry #x5be ".") ; MAQAF
291  (modify-syntax-entry #x5c0 ".") ; PASEQ  (modify-syntax-entry #x5c0 ".") ; PASEQ
292  (modify-syntax-entry #x5c3 ".") ; SOF PASUQ  (modify-syntax-entry #x5c3 ".") ; SOF PASUQ
293  (modify-syntax-entry #x5f3 ".") ; GERESH  (modify-syntax-entry #x5f3 ".") ; GERESH
294  (modify-syntax-entry #x5f4 ".") ; GERSHAYIM  (modify-syntax-entry #x5f4 ".") ; GERSHAYIM
295    
 ;; (let ((c 224))  
 ;;   (while (< c 251)  
 ;;     (modify-syntax-entry (make-char 'hebrew-iso8859-8 c) "w")  
 ;;     (setq c (1+ c))))  
 ;; (modify-syntax-entry (make-char 'hebrew-iso8859-8 160) "w") ; NBSP  
   
296  ;; Indian character set (IS 13194 and other Emacs original Indian charsets)  ;; Indian character set (IS 13194 and other Emacs original Indian charsets)
297    
 ;; (modify-category-entry (make-char 'indian-is13194) ?i)  
 ;; (modify-category-entry (make-char 'indian-2-column) ?I)  
 ;; (modify-category-entry (make-char 'indian-glyph) ?I)  
 ;; Unicode Devanagari block  
298  (modify-category-entry '(#x901 . #x970) ?i)  (modify-category-entry '(#x901 . #x970) ?i)
299  (map-charset-chars #'modify-category-entry 'indian-is13194 ?i)  (map-charset-chars #'modify-category-entry 'indian-is13194 ?i)
300  (map-charset-chars #'modify-category-entry 'indian-2-column ?i)  (map-charset-chars #'modify-category-entry 'indian-2-column ?i)
301    
 ;;; Commented out since the categories appear not to be used anywhere  
 ;;; and word syntax is the default.  
 ;; (let ((deflist                               ;  
 ;;      '(;; chars      syntax  category  
 ;;        ("ँंः"  "w"     ?7) ; vowel-modifying diacritical mark  
 ;;                                  ; chandrabindu, anuswar, visarga  
 ;;        ("अ-ऍ"    "w"     ?1) ; base (independent) vowel  
 ;;        ("क-ह"    "w"     ?0) ; consonant  
 ;;        ("ा-ॉ"    "w"     ?8) ; matra  
 ;;        ("०-९"    "w"     ?6) ; digit  
 ;;        ))  
 ;;       elm chars len syntax category to ch i)  
 ;;   (while deflist  
 ;;     (setq elm (car deflist))  
 ;;     (setq chars (car elm)  
 ;;        len (length chars)  
 ;;        syntax (nth 1 elm)  
 ;;        category (nth 2 elm)  
 ;;        i 0)  
 ;;     (while (< i len)  
 ;;       (if (= (aref chars i) ?-)  
 ;;        (setq i (1+ i)  
 ;;              to (aref chars i))  
 ;;      (setq ch (aref chars i)  
 ;;            to ch))  
 ;;       (while (<= ch to)  
 ;;      (modify-syntax-entry ch syntax)  
 ;;      (modify-category-entry ch category)  
 ;;      (setq ch (1+ ch)))  
 ;;       (setq i (1+ i)))  
 ;;     (setq deflist (cdr deflist))))  
   
302    
303  ;; Japanese character set (JISX0201-kana, JISX0201-roman, JISX0208, JISX0212)  ;; Japanese character set (JISX0201-kana, JISX0201-roman, JISX0208, JISX0212)
304    
# Line 463  Line 350 
350    (while (<= c #x30ff)    (while (<= c #x30ff)
351      ;; ?K is double width, ?k isn't specified      ;; ?K is double width, ?k isn't specified
352      (modify-category-entry c ?K)      (modify-category-entry c ?K)
     ;;(modify-category-entry (decode-char 'ucs c) ?j)  
353      (modify-category-entry c ?\|)      (modify-category-entry c ?\|)
354      (setq c (1+ c))))      (setq c (1+ c))))
355    
# Line 472  Line 358 
358    (while (<= c #x309f)    (while (<= c #x309f)
359      ;; ?H is actually defined to be double width      ;; ?H is actually defined to be double width
360      (modify-category-entry c ?H)      (modify-category-entry c ?H)
     ;;(modify-category-entry (decode-char 'ucs c) ?j)  
361      (modify-category-entry c ?\|)      (modify-category-entry c ?\|)
362      (setq c (1+ c))))      (setq c (1+ c))))
363    
# Line 519  Line 404 
404      (setq chars (cdr chars))))      (setq chars (cdr chars))))
405    
406  ;; JISX0212  ;; JISX0212
407  ;; (modify-syntax-entry (make-char 'japanese-jisx0212) "w")  
408  ;; (modify-syntax-entry (make-char 'japanese-jisx0212 33) "_")  (modify-syntax-entry (cons (make-char 'japanese-jisx0212 33 33)
409  ;; (modify-syntax-entry (make-char 'japanese-jisx0212 34) "_")                             (make-char 'japanese-jisx0212 33 126))
410  ;; (modify-syntax-entry (make-char 'japanese-jisx0212 35) "_")                       "_")
411    (modify-syntax-entry (cons (make-char 'japanese-jisx0212 34 33)
412                               (make-char 'japanese-jisx0212 34 126))
413                         "_")
414    (modify-syntax-entry (cons (make-char 'japanese-jisx0212 35 33)
415                               (make-char 'japanese-jisx0212 35 126))
416                         "_")
417    
418  (modify-syntax-entry (cons (decode-char 'japanese-jisx0212 #x2121)  (modify-syntax-entry (cons (decode-char 'japanese-jisx0212 #x2121)
419                             (decode-char 'japanese-jisx0212 #x237E))                             (decode-char 'japanese-jisx0212 #x237E))
420                       "_")                       "_")
421    
422  ;; JISX0201-Kana  ;; JISX0201-Kana
423  ;; (modify-syntax-entry (make-char 'katakana-jisx0201) "w")  
424  (let ((chars '(?。 ?、 ?・)))  (let ((chars '(?。 ?、 ?・)))
425    (while chars    (while chars
426      (modify-syntax-entry (car chars) ".")      (modify-syntax-entry (car chars) ".")
# Line 540  Line 431 
431    
432  ;; Korean character set (KSC5601)  ;; Korean character set (KSC5601)
433    
434  ;; Fixme: re-instate these  (map-charset-chars #'modify-category-entry 'korean-ksc5601 ?h)
435    (modify-syntax-entry (cons (make-char 'korean-ksc5601 33 33)
436  ;; (modify-syntax-entry (make-char 'korean-ksc5601) "w")                             (make-char 'korean-ksc5601 33 126))
437  ;; (modify-syntax-entry (make-char 'korean-ksc5601 33) "_")                       "_")
438  ;; (modify-syntax-entry (make-char 'korean-ksc5601 34) "_")  ;; Fixme: Giving `invalid code' because the charset has holes --
439  ;; (modify-syntax-entry (make-char 'korean-ksc5601 38) "_")  ;; presumably map should be used just for unification.
440  ;; (modify-syntax-entry (make-char 'korean-ksc5601 39) "_")  ;; (modify-syntax-entry (cons (make-char 'korean-ksc5601 34 33)
441  ;; (modify-syntax-entry (make-char 'korean-ksc5601 40) "_")  ;;                         (make-char 'korean-ksc5601 34 126))
442  ;; (modify-syntax-entry (make-char 'korean-ksc5601 41) "_")  ;;                   "_")
443    ;; (modify-syntax-entry (cons (make-char 'korean-ksc5601 38 33)
444  ;; (modify-category-entry (make-char 'korean-ksc5601) ?h)  ;;                         (make-char 'korean-ksc5601 38 126))
445  ;; (modify-category-entry (make-char 'korean-ksc5601 35) ?A)  ;;                   "_")
446  ;; (modify-category-entry (make-char 'korean-ksc5601 37) ?G)  ;; (modify-syntax-entry (cons (make-char 'korean-ksc5601 39 33)
447  ;; (modify-category-entry (make-char 'korean-ksc5601 42) ?H)  ;;                         (make-char 'korean-ksc5601 39 126))
448  ;; (modify-category-entry (make-char 'korean-ksc5601 43) ?K)  ;;                   "_")
449  ;; (modify-category-entry (make-char 'korean-ksc5601 44) ?Y)  (modify-syntax-entry (cons (make-char 'korean-ksc5601 40 33)
450                               (make-char 'korean-ksc5601 40 126))
451                         "_")
452    (modify-syntax-entry (cons (make-char 'korean-ksc5601 41 33)
453                               (make-char 'korean-ksc5601 41 126))
454                         "_")
455    (modify-category-entry (cons (make-char 'korean-ksc5601 35 33)
456                                 (make-char 'korean-ksc5601 35 126))
457                           ?A)
458    ;; (modify-category-entry (cons (make-char 'korean-ksc5601 37 33)
459    ;;                           (make-char 'korean-ksc5601 37 126))
460    ;;                     ?G)
461    ;; (modify-category-entry (cons (make-char 'korean-ksc5601 42 33)
462    ;;                           (make-char 'korean-ksc5601 42 126))
463    ;;                     ?H)
464    ;; (modify-category-entry (cons (make-char 'korean-ksc5601 43 33)
465    ;;                           (make-char 'korean-ksc5601 43 126))
466    ;;                     ?K)
467    ;; (modify-category-entry (cons (make-char 'korean-ksc5601 44 33)
468    ;;                           (make-char 'korean-ksc5601 44 126))
469    ;;                     ?Y)
470    
471  ;; Latin  ;; Latin
472    
# Line 700  Line 611 
611        (if lc (modify-category-entry lc ?v)))        (if lc (modify-category-entry lc ?v)))
612      (setq i (1+ i))))      (setq i (1+ i))))
613    
 ;; Unicode (mule-unicode-0100-24ff)  
   
614  (let ((tbl (standard-case-table)) c)  (let ((tbl (standard-case-table)) c)
615    
616  ;; In some languages, U+0049 LATIN CAPITAL LETTER I and U+0131 LATIN  ;; In some languages, U+0049 LATIN CAPITAL LETTER I and U+0131 LATIN
# Line 950  Line 859 
859      (modify-category-entry (+ c #x20) ?l)      (modify-category-entry (+ c #x20) ?l)
860      (setq c (1+ c)))      (setq c (1+ c)))
861    
   ;; Ohm, Kelvin, Angstrom  
 ;;;  (set-case-syntax-pair ?Ω ?ω tbl)  
 ;;;  These mess up the case conversion of k and å.  
 ;;;  (set-case-syntax-pair ?K ?k tbl)  
 ;;;  (set-case-syntax-pair ?Å ?å tbl)  
   
862    ;; Combining diacritics    ;; Combining diacritics
863    (modify-category-entry '(#x300 . #x362) ?^)    (modify-category-entry '(#x300 . #x362) ?^)
864    ;; Combining marks    ;; Combining marks
# Line 1087  Line 990 
990   (lambda (range ignore) (set-char-table-range char-width-table range 2))   (lambda (range ignore) (set-char-table-range char-width-table range 2))
991   'arabic-2-column)   'arabic-2-column)
992    
993    (optimize-char-table (standard-case-table))
994    (optimize-char-table char-width-table)
995    (optimize-char-table (standard-category-table))
996    (optimize-char-table (standard-syntax-table))
997    
998  ;;; Local Variables:  ;;; Local Variables:
999  ;;; coding: utf-8-emacs  ;;; coding: utf-8-emacs
1000  ;;; End:  ;;; End:

Legend:
Removed from v.1.35.2.9  
changed lines
  Added in v.1.35.2.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26