comparison lisp/mule/cyrillic.el @ 4090:751ae075e76e

[xemacs-hg @ 2007-08-01 13:53:32 by aidan] Add some more locale information, Windows-1253, fix a make-8-bit-coding-system bug.
author aidan
date Wed, 01 Aug 2007 13:53:41 +0000
parents aa28d959af41
children edb00a8b4eff
comparison
equal deleted inserted replaced
4089:094d7cbe2c62 4090:751ae075e76e
113 charset-g1 cyrillic-iso8859-5 113 charset-g1 cyrillic-iso8859-5
114 charset-g2 t 114 charset-g2 t
115 charset-g3 t 115 charset-g3 t
116 mnemonic "ISO8/Cyr")) 116 mnemonic "ISO8/Cyr"))
117 117
118 ;; Provide this locale; but don't allow it to be picked up from the Unix
119 ;; locale (it has no locale entry in the alist), we leave that to Russian.
118 (set-language-info-alist 120 (set-language-info-alist
119 "Cyrillic-ISO" '((charset cyrillic-iso8859-5) 121 "Cyrillic-ISO" '((charset cyrillic-iso8859-5)
120 (tutorial . "TUTORIAL.ru") 122 (tutorial . "TUTORIAL.ru")
121 (coding-system iso-8859-5) 123 (coding-system iso-8859-5)
122 (native-coding-system iso-8859-5) 124 (native-coding-system iso-8859-5)
269 character of the opposite case). " 271 character of the opposite case). "
270 aliases (cyrillic-koi8 koi8 cp878))) 272 aliases (cyrillic-koi8 koi8 cp878)))
271 273
272 ;; Create a corresponding language environment. 274 ;; Create a corresponding language environment.
273 (set-language-info-alist 275 (set-language-info-alist
274 "Cyrillic-KOI8" '((charset cyrillic-iso8859-5) 276 "Russian" '((charset cyrillic-iso8859-5)
275 (coding-system koi8-r) 277 (coding-system koi8-r)
276 (native-coding-system koi8-r) 278 (native-coding-system koi8-r)
277 (coding-priority koi8-r) 279 (coding-priority koi8-r)
278 (input-method . "cyrillic-yawerty") 280 (input-method . "cyrillic-yawerty")
279 (features cyril-util) 281 (features cyril-util)
280 (locale "ru") 282 (locale "ru")
281 (mswindows-locale . "RUSSIAN") 283 (mswindows-locale . "RUSSIAN")
282 (tutorial . "TUTORIAL.ru") 284 (tutorial . "TUTORIAL.ru")
283 (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") 285 (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!")
284 (documentation . "Support for Cyrillic KOI8-R.")) 286 (documentation . "Support for Russian."))
285 '("Cyrillic")) 287 '("Cyrillic"))
286 288
287 ;; Alias it to Russian. 289 ;; Provide Cyrillic-KOI8 for old times' sake too, but don't allow it to be
290 ;; selected by the Unix locale. A variant language environment called
291 ;; "Cyrillic-KOI8 (UTF-8)" just looks too odd.
292
288 (set-language-info-alist 293 (set-language-info-alist
289 "Russian" 294 "Cyrillic-KOI8"
290 (cdr (assoc "Cyrillic-KOI8" language-info-alist)) 295 (remassq 'locale (copy-list (cdr (assoc "Russian" language-info-alist))))
291 '("Cyrillic")) 296 '("Cyrillic"))
292 297
293 ;; KOI8-U, for Ukrainian. 298 ;; KOI8-U, for Ukrainian.
294 (make-8-bit-coding-system 299 (make-8-bit-coding-system
295 'koi8-u 300 'koi8-u
442 (put-case-table-pair upper lower case-table)) 447 (put-case-table-pair upper lower case-table))
443 448
444 (set-language-info-alist 449 (set-language-info-alist
445 "Ukrainian" '((coding-system koi8-u) 450 "Ukrainian" '((coding-system koi8-u)
446 (coding-priority koi8-u) 451 (coding-priority koi8-u)
452 (locale "uk")
447 (input-method . "cyrillic-ukrainian") 453 (input-method . "cyrillic-ukrainian")
448 (documentation 454 (documentation
449 . "Support for Ukrainian with KOI8-U character set.")) 455 . "Support for Ukrainian."))
450 '("Cyrillic")) 456 '("Cyrillic"))
451 457
452 ;; Windows 1251 may be provide automatically on Windows, in which case 458 ;; Windows 1251 may be provided automatically on Windows, in which case we
453 ;; we don't need to. 459 ;; don't need to provide it.
460 ;; #### (Though we should provide the CP1251 alias.)
454 (unless (find-coding-system 'windows-1251) 461 (unless (find-coding-system 'windows-1251)
455 (make-8-bit-coding-system 462 (make-8-bit-coding-system
456 'windows-1251 463 'windows-1251
457 '((#x80 ?\u0402) ;; CYRILLIC CAPITAL LETTER DJE 464 '((#x80 ?\u0402) ;; CYRILLIC CAPITAL LETTER DJE
458 (#x81 ?\u0403) ;; CYRILLIC CAPITAL LETTER GJE 465 (#x81 ?\u0403) ;; CYRILLIC CAPITAL LETTER GJE
592 599
593 (set-language-info-alist 600 (set-language-info-alist
594 "Bulgarian" '((coding-system windows-1251) 601 "Bulgarian" '((coding-system windows-1251)
595 (coding-priority windows-1251) 602 (coding-priority windows-1251)
596 (input-method . "bulgarian-bds") 603 (input-method . "bulgarian-bds")
604 (locale "bg")
597 (documentation 605 (documentation
598 . "Support for Bulgarian with windows-1251 character set.") 606 . "Support for Bulgarian. ")
599 (tutorial . "TUTORIAL.bg")) 607 (tutorial . "TUTORIAL.bg"))
600 '("Cyrillic")) 608 '("Cyrillic"))
601 609
602 (set-language-info-alist 610 (set-language-info-alist
603 "Belarusian" '((coding-system windows-1251) 611 "Belarusian" '((coding-system windows-1251)
604 (coding-priority windows-1251) 612 (coding-priority windows-1251)
613 (locale "be")
605 (input-method . "belarusian") 614 (input-method . "belarusian")
606 (documentation 615 (documentation
607 . "Support for Belarusian with windows-1251 character set. 616 . "Support for Belarusian. \(The name Belarusian replaced\
608 \(The name Belarusian replaced Byelorussian in the early 1990s.)")) 617 Byelorussian in the early 1990s.)"))
609 '("Cyrillic")) 618 '("Cyrillic"))
610 619
611 ;;; Alternativnyj 620 ;;; Alternativnyj
612 (make-8-bit-coding-system 621 (make-8-bit-coding-system
613 'alternativnyj 622 'alternativnyj
887 (#xFF ?\u042A));; CYRILLIC CAPITAL LETTER HARD SIGN 896 (#xFF ?\u042A));; CYRILLIC CAPITAL LETTER HARD SIGN
888 "KOI8-RU, a mostly-compatible superset of KOI8-R. 897 "KOI8-RU, a mostly-compatible superset of KOI8-R.
889 Also known as Windows code page 21866; has Ukrainian and Belarussian support. " 898 Also known as Windows code page 21866; has Ukrainian and Belarussian support. "
890 '(mnemonic ",L@C(B" 899 '(mnemonic ",L@C(B"
891 aliases (cp21866))) 900 aliases (cp21866)))
892
893 (set-language-info-alist
894 "Cyrillic-KOI8RU" '((charset cyrillic-iso8859-5)
895 (coding-system koi8-ru)
896 (native-coding-system koi8-ru)
897 (coding-priority koi8-ru)
898 (input-method . "cyrillic-yawerty")
899 (tutorial . "TUTORIAL.ru")
900 (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!")
901 (documentation . "Support for Cyrillic ALTERNATIVNYJ."))
902 '("Cyrillic"))
903 901
904 ;; We should provide an input method and the corresponding language 902 ;; We should provide an input method and the corresponding language
905 ;; environments for the next three coding systems. 903 ;; environments for the next three coding systems.
906 904
907 (make-8-bit-coding-system 905 (make-8-bit-coding-system