]> code.delx.au - gnu-emacs/blob - lisp/language/european.el
Fix FSF address in comment.
[gnu-emacs] / lisp / language / european.el
1 ;;; european.el --- Support for European languages
2
3 ;; Copyright (C) 1995 Free Software Foundation, Inc.
4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
5
6 ;; Keywords: multilingual, European
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
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.
24
25 ;;; Commentary:
26
27 ;; For Europeans, five character sets ISO8859-1,2,3,4,9 are supported.
28
29 ;;; Code:
30
31 (make-coding-system
32 'coding-system-iso-8859-1 2 ?X
33 "Coding-system used in X as Compound Text Encoding."
34 '((ascii t) (latin-iso8859-1 t) nil nil
35 nil ascii-eol ascii-cntl))
36
37 ;; CTEXT is an alias for ISO-8859-1
38 (put 'coding-system-ctext 'coding-system 'coding-system-iso-8859-1)
39
40 (make-coding-system
41 'coding-system-iso-8859-2 2 ?2 "MIME ISO-8859-2"
42 '((ascii t) (latin-iso8859-2 t) nil nil
43 nil ascii-eol ascii-cntl nil nil nil nil))
44
45 (make-coding-system
46 'coding-system-iso-8859-3 2 ?3 "MIME ISO-8859-3"
47 '((ascii t) (latin-iso8859-3 t) nil nil
48 nil ascii-eol ascii-cntl nil nil nil nil))
49
50 (make-coding-system
51 'coding-system-iso-8859-4 2 ?4 "MIME ISO-8859-4"
52 '((ascii t) (latin-iso8859-4 t) nil nil
53 nil ascii-eol ascii-cntl nil nil nil nil))
54
55 (make-coding-system
56 'coding-system-iso-8859-9 2 ?9 "MIME ISO-8859-9"
57 '((ascii t) (latin-iso8859-9 t) nil nil
58 nil ascii-eol ascii-cntl nil nil nil nil))
59
60 (register-input-method "European"
61 '("quail-latin-1" quail-use-package "quail/latin"))
62 (register-input-method "European"
63 '("quail-latin-2" quail-use-package "quail/latin"))
64 (register-input-method "European"
65 '("quail-latin-3" quail-use-package "quail/latin"))
66 (register-input-method "European"
67 '("quail-latin-4" quail-use-package "quail/latin"))
68 (register-input-method "European"
69 '("quail-latin-5" quail-use-package "quail/latin"))
70
71 (defun setup-european-environment ()
72 (setq coding-category-iso-8-1 'coding-system-iso-8859-1)
73
74 (set-coding-priority
75 '(coding-category-iso-7
76 coding-category-iso-8-1
77 coding-category-iso-8-2))
78
79 (setq-default buffer-file-coding-system 'coding-system-iso-8859-1)
80 (set-terminal-coding-system 'coding-system-iso-8859-1)
81 (set-keyboard-coding-system 'coding-system-iso-8859-1)
82
83 (setq default-input-method '("European" . "quail-latin-1"))
84 )
85
86 (set-language-info "English" 'tutorial "TUTORIAL")
87
88 (register-input-method "French"
89 '("quail-latin-1" quail-use-package "quail/latin"))
90 (register-input-method "French"
91 '("quail-latin-1" quail-use-package "quail/latin"))
92
93 (set-language-info-alist
94 "European" '((setup-function . setup-european-environment)
95 (charset . (ascii latin-iso8859-1 latin-iso8859-2
96 latin-iso8859-3 latin-iso8859-4 latin-iso8859-9))
97 (coding-system . (coding-system-iso-8859-1
98 coding-system-iso-8859-2
99 coding-system-iso-8859-3
100 coding-system-iso-8859-4
101 coding-system-iso-8859-9))
102 (documentation . t)
103 (sample-text
104 . "Hello, Hej, Tere, Hei, Bonjour, Gr\e,A|_\e(B Gott, Ciao, \e,A!\e(BHola!")))
105
106 ;;; european.el ends here