Commit | Line | Data |
---|---|---|
4ed46869 KH |
1 | ;;; cyrillic.el --- Support for languages which use Cyrillic characters |
2 | ||
3 | ;; Copyright (C) 1995 Free Software Foundation, Inc. | |
4 | ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | |
5 | ||
6 | ;; Keywords: multilingual, Cyrillic | |
7 | ||
8 | ;; This file is part of GNU Emacs. | |
9 | ||
10 | ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 | ;; it under the terms of the GNU General Public License as published by | |
12 | ;; the Free Software Foundation; either version 2, or (at your option) | |
13 | ;; any later version. | |
14 | ||
15 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ;; GNU General Public License for more details. | |
19 | ||
20 | ;; You should have received a copy of the GNU General Public License | |
369314dc KH |
21 | ;; along with GNU Emacs; see the file COPYING. If not, write to the |
22 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 | ;; Boston, MA 02111-1307, USA. | |
4ed46869 KH |
24 | |
25 | ;;; Commentary: | |
26 | ||
27 | ;; The character set ISO8859-5 is supported. | |
28 | ||
29 | ;;; Code: | |
30 | ||
31 | (make-coding-system | |
32 | 'coding-system-iso-8859-5 2 ?5 "MIME ISO-8859-5" | |
33 | '((ascii t) (cyrillic-iso8859-5 t) nil nil | |
34 | nil ascii-eol ascii-cntl nil nil nil nil)) | |
35 | ||
36 | (register-input-method | |
37 | "Cyrillic" '("quail-jcuken" quail-use-package "quail/cyrillic")) | |
38 | (register-input-method | |
39 | "Cyrillic" '("quail-macedonian" quail-use-package "quail/cyrillic")) | |
40 | (register-input-method | |
41 | "Cyrillic" '("quail-serbian" quail-use-package "quail/cyrillic")) | |
42 | (register-input-method | |
43 | "Cyrillic" '("quail-beylorussian" quail-use-package "quail/cyrillic")) | |
44 | (register-input-method | |
45 | "Cyrillic" '("quail-ukrainian" quail-use-package "quail/cyrillic")) | |
46 | (register-input-method | |
47 | "Cyrillic" '("quail-yawerty" quail-use-package "quail/cyrillic")) | |
48 | ||
49 | (defun setup-cyrillic-environment () | |
50 | (setq primary-language "Cyrillic") | |
51 | ||
52 | (setq coding-category-iso-8-1 'coding-system-iso-8859-5) | |
53 | ||
54 | (set-coding-priority | |
55 | '(coding-category-iso-7 | |
56 | coding-category-iso-8-1)) | |
57 | ||
58 | (setq-default buffer-file-coding-system 'coding-system-iso-8859-5) | |
59 | (set-terminal-coding-system 'coding-system-iso-8859-5) | |
60 | (set-keyboard-coding-system 'coding-system-iso-8859-5) | |
61 | ||
62 | (setq default-input-method '("Cyrillic" . "quail-yawerty")) | |
63 | ) | |
64 | ||
65 | (set-language-info-alist | |
66 | "Cyrillic" '((setup-function . setup-cyrillic-environment) | |
67 | (charset . (cyrillic-iso8859-5)) | |
68 | (coding-system . (coding-system-iso-8859-5)) | |
69 | (documentation . t) | |
70 | (sample-text . "Russian (\e,L@caaZXY\e(B) \e,L7T`PRabRcYbU\e(B!"))) | |
71 | ||
72 | ;;; cyrillic.el ends here |