comparison lisp/mule/greek.el @ 3748:ed9fdfb69780

[xemacs-hg @ 2006-12-17 13:23:34 by aidan] Add a case table for Greek, rework the syntax.
author aidan
date Sun, 17 Dec 2006 13:23:50 +0000
parents 2923009caf47
children 6b2ef948e140
comparison
equal deleted inserted replaced
3747:c13b89ba4796 3748:ed9fdfb69780
27 27
28 ;; For Greek, the character set ISO8859-7 is supported. 28 ;; For Greek, the character set ISO8859-7 is supported.
29 29
30 ;;; Code: 30 ;;; Code:
31 31
32 ; (make-charset 'greek-iso8859-7 32 (loop
33 ; "Right-Hand Part of Latin/Greek Alphabet (ISO/IEC 8859-7): ISO-IR-126" 33 for (upper lower)
34 ; '(dimension 34 in '((#xdb #xfb) ;; UPSILON WITH DIALYTIKA
35 ; 1 35 (#xda #xfa) ;; IOTA WITH DIALYTIKA
36 ; registry "ISO8859-7" 36 (#xd9 #xf9) ;; OMEGA
37 ; chars 96 37 (#xd8 #xf8) ;; PSI
38 ; columns 1 38 (#xd7 #xf7) ;; CHI
39 ; direction l2r 39 (#xd6 #xf6) ;; PHI
40 ; final ?F 40 (#xd5 #xf5) ;; UPSILON
41 ; graphic 1 41 (#xd4 #xf4) ;; TAU
42 ; short-name "RHP of ISO8859/7" 42 (#xd3 #xf3) ;; SIGMA
43 ; long-name "RHP of Greek (ISO 8859-7): ISO-IR-126" 43 (#xd1 #xf1) ;; RHO
44 ; )) 44 (#xd0 #xf0) ;; PI
45 (#xcf #xef) ;; OMICRON
46 (#xce #xee) ;; XI
47 (#xcd #xed) ;; NU
48 (#xcc #xec) ;; MU
49 (#xcb #xeb) ;; LAMDA
50 (#xca #xea) ;; KAPPA
51 (#xc9 #xe9) ;; IOTA
52 (#xc8 #xe8) ;; THETA
53 (#xc7 #xe7) ;; ETA
54 (#xc6 #xe6) ;; ZETA
55 (#xc5 #xe5) ;; EPSILON
56 (#xc4 #xe4) ;; DELTA
57 (#xc3 #xe3) ;; GAMMA
58 (#xc2 #xe2) ;; BETA
59 (#xc1 #xe1) ;; ALPHA
60 (#xbf #xfe) ;; OMEGA WITH TONOS
61 (#xbe #xfd) ;; UPSILON WITH TONOS
62 (#xbc #xfc) ;; OMICRON WITH TONOS
63 (#xba #xdf) ;; IOTA WITH TONOS
64 (#xb9 #xde) ;; ETA WITH TONOS
65 (#xb8 #xdd) ;; EPSILON WITH TONOS
66 (#xb6 #xdc) ;; ALPHA WITH TONOS
67 (#xD3 #xF2)) ;; FINAL SIGMA
68 ;; No case mappings for:
69 ;;
70 ;; (#xE0 "GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS")
71 ;; (#xC0 "GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS")
72 ;;
73 with case-table = (standard-case-table)
74 do
75 (put-case-table-pair (make-char 'greek-iso8859-7 upper)
76 (make-char 'greek-iso8859-7 lower) case-table))
45 77
46 ;; For syntax of Greek 78 ;; Now, syntax.
47 (loop for c from 54 to 126 79 (dolist (code '(#xA1 ;; LEFT SINGLE QUOTATION MARK
48 do (modify-syntax-entry (make-char 'greek-iso8859-7 c) "w")) 80 #xA2 ;; RIGHT SINGLE QUOTATION MARK
49 (modify-syntax-entry (make-char 'greek-iso8859-7 32) "w") ; no-break space 81 #xA3 ;; POUND SIGN
50 (modify-syntax-entry ?,F7(B ".") 82 #xA6 ;; BROKEN BAR
51 (modify-syntax-entry ?,F;(B ".") 83 #xA7 ;; SECTION SIGN
52 (modify-syntax-entry ?,F=(B ".") 84 #xA8 ;; DIAERESIS
85 #xA9 ;; COPYRIGHT SIGN
86 #xAB ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
87 #xAC ;; NOT SIGN
88 #xAD ;; SOFT HYPHEN
89 #xAF ;; HORIZONTAL BAR
90 #xB0 ;; DEGREE SIGN
91 #xB1 ;; PLUS-MINUS SIGN
92 #xB7 ;; MIDDLE DOT
93 #xBB)) ;; RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
94 (modify-syntax-entry (make-char 'greek-iso8859-7 code) "."))
53 95
96 ;; NO-BREAK SPACE
97 (modify-syntax-entry (make-char 'greek-iso8859-7 #xA0) " ")
54 98
55 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 99 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
56 ;;; GREEK 100 ;;; GREEK
57 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 101 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
58 102
59 103
60 ;; (make-coding-system
61 ;; 'greek-iso-8bit 2 ?7
62 ;; "ISO 2022 based 8-bit encoding for Greek (MIME:ISO-8859-7)"
63 ;; '(ascii greek-iso8859-7 nil nil
64 ;; nil nil nil nil nil nil nil)
65 ;; '((safe-charsets ascii greek-iso8859-7)
66 ;; (mime-charset . iso-8859-7)))
67
68 ;; (define-coding-system-alias 'iso-8859-7 'greek-iso-8bit)
69
70 (make-coding-system 104 (make-coding-system
71 'iso-8859-7 'iso2022 "ISO-8859-7 (Greek)" 105 'iso-8859-7 'iso2022 "ISO-8859-7 (Greek)"
72 '(charset-g0 ascii 106 '(charset-g0 ascii
73 charset-g1 greek-iso8859-7 107 charset-g1 greek-iso8859-7
74 charset-g2 t 108 charset-g2 t
75 charset-g3 t 109 charset-g3 t
76 mnemonic "Grk" 110 mnemonic "Grk"))
77 ))
78 111
79 (set-language-info-alist 112 (set-language-info-alist
80 "Greek" '((charset greek-iso8859-7) 113 "Greek" '((charset greek-iso8859-7)
81 (coding-system iso-8859-7) 114 (coding-system iso-8859-7)
82 (coding-priority iso-8859-7) 115 (coding-priority iso-8859-7)