Mercurial > hg > xemacs-beta
comparison lisp/mule/european.el @ 728:4d00488244c1
[xemacs-hg @ 2002-01-10 09:50:43 by stephent]
Add ISO 8859/15 support. <877kqq8rkj.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Thu, 10 Jan 2002 09:50:50 +0000 |
parents | 8de8e3f6228a |
children | 943eaba38521 |
comparison
equal
deleted
inserted
replaced
727:c00528d80f25 | 728:4d00488244c1 |
---|---|
1 ;;; european.el --- European languages -*- coding: iso-2022-7bit; -*- | 1 ;;; european.el --- European languages -*- coding: iso-2022-7bit; -*- |
2 | 2 |
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | 3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. |
4 ;; Licensed to the Free Software Foundation. | 4 ;; Licensed to the Free Software Foundation. |
5 ;; Copyright (C) 1997 MORIOKA Tomohiko | 5 ;; Copyright (C) 1997 MORIOKA Tomohiko |
6 ;; Copyright (C) 2002 Free Software Foundation | |
6 | 7 |
7 ;; Keywords: multilingual, European | 8 ;; Keywords: multilingual, European |
8 | 9 |
9 ;; This file is part of XEmacs. | 10 ;; This file is part of XEmacs. |
10 | 11 |
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | 24 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
24 ;; 02111-1307, USA. | 25 ;; 02111-1307, USA. |
25 | 26 |
26 ;;; Commentary: | 27 ;;; Commentary: |
27 | 28 |
28 ;; For Europeans, five character sets ISO8859-1,2,3,4,9 are supported. | 29 ;; Support six Latin coded character sets ISO8859-1,2,3,4,9,15. |
29 | 30 |
30 ;; #### latin.el would be a better name for this file. | 31 ;; #### latin.el would be a better name for this file. |
31 | 32 |
32 ;;; Code: | 33 ;;; Code: |
33 | 34 |
36 do (modify-syntax-entry (make-char 'latin-iso8859-1 c) "w")) | 37 do (modify-syntax-entry (make-char 'latin-iso8859-1 c) "w")) |
37 | 38 |
38 (modify-syntax-entry (make-char 'latin-iso8859-1 32) "w") ; no-break space | 39 (modify-syntax-entry (make-char 'latin-iso8859-1 32) "w") ; no-break space |
39 (modify-syntax-entry ?,AW(B "_") | 40 (modify-syntax-entry ?,AW(B "_") |
40 (modify-syntax-entry ?,Aw(B "_") | 41 (modify-syntax-entry ?,Aw(B "_") |
42 | |
43 ;; For syntax of Latin-9 characters. | |
44 ;; Based on Latin-1 and differences from Jukka Korpela | |
45 ;; http://www.cs.tut.fi/~jkorpela/latin9.html | |
46 (loop for c in '(?,b&(B ?,b((B ?,b4(B ?,b8(B ?,b<(B ?,b=(B ?,b>(B) | |
47 do (modify-syntax-entry c "w")) | |
48 | |
49 (loop for c from 64 to 127 ; from ',b@(B' to ',b(B' | |
50 do (modify-syntax-entry (make-char 'latin-iso8859-1 c) "w")) | |
51 | |
52 (modify-syntax-entry (make-char 'latin-iso8859-15 32) "w") ; no-break space | |
53 (modify-syntax-entry ?,bW(B "_") | |
54 (modify-syntax-entry ?,bw(B "_") | |
41 | 55 |
42 ;; For syntax of Latin-2 | 56 ;; For syntax of Latin-2 |
43 (loop for c in '(?,B!(B ?,B#(B ?,B%(B ?,B&(B ?,B)(B ?,B*(B ?,B+(B ?,B,(B ?,B.(B ?,B/(B ?,B1(B ?,B3(B ?,B5(B ?,B6(B ?,B9(B ?,B:(B ?,B;(B ?,B<(B) | 57 (loop for c in '(?,B!(B ?,B#(B ?,B%(B ?,B&(B ?,B)(B ?,B*(B ?,B+(B ?,B,(B ?,B.(B ?,B/(B ?,B1(B ?,B3(B ?,B5(B ?,B6(B ?,B9(B ?,B:(B ?,B;(B ?,B<(B) |
44 do (modify-syntax-entry c "w")) | 58 do (modify-syntax-entry c "w")) |
45 | 59 |
147 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish. | 161 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish. |
148 "))) | 162 "))) |
149 '("European")) | 163 '("European")) |
150 | 164 |
151 | 165 |
166 ;; Latin-9 (ISO-8859-15) | |
167 ;; Latin-1 plus Euro, plus a few accented characters | |
168 | |
169 ;; (make-charset 'latin-iso8859-15 | |
170 ;; "Latin-9, aka Latin-1 with Euro etc" | |
171 ;; '(short-name "Latin 9" | |
172 ;; long-name "Latin-9 (typically GR of ISO 8859/15)" | |
173 ;; registry "iso8859-15" | |
174 ;; dimension 1 | |
175 ;; columns 1 | |
176 ;; chars 96 | |
177 ;; final ?b ; ISO-IR-203 | |
178 ;; graphic 1 | |
179 ;; direction l2r)) | |
180 | |
181 (make-coding-system | |
182 'iso-8859-15 'iso2022 | |
183 "ISO 4873 conforming 8-bit code (ASCII + Latin 9; aka Latin-1 with Euro)" | |
184 `(mnemonic "MIME/Ltn-9" ; bletch | |
185 eol-type nil | |
186 charset-g0 ascii | |
187 charset-g1 latin-iso8859-15 | |
188 charset-g2 t | |
189 charset-g3 t | |
190 )) | |
191 | |
192 (defun setup-latin9-environment () | |
193 "Set up multilingual environment (MULE) for European Latin-9 users." | |
194 (interactive) | |
195 (set-language-environment "Latin-9")) | |
196 | |
197 (set-language-info-alist | |
198 "Latin-9" '((charset ascii latin-iso8859-15) | |
199 (coding-system iso-8859-15) | |
200 (coding-priority iso-8859-15) | |
201 (input-method . "latin-1-prefix") ; FIXME!! | |
202 (sample-text | |
203 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!, my ") | |
204 (documentation . "\ | |
205 This language environment is a generic one for Latin-9 (ISO-8859-15) | |
206 character set which supports the Euro sign and the following languages: | |
207 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, | |
208 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.")) | |
209 '("European")) | |
210 | |
211 | |
152 ;; Latin-2 (ISO-8859-2) | 212 ;; Latin-2 (ISO-8859-2) |
153 | 213 |
154 ;; (make-coding-system | 214 ;; (make-coding-system |
155 ;; 'iso-latin-2 2 ?2 | 215 ;; 'iso-latin-2 2 ?2 |
156 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)" | 216 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)" |