Merge r21-4-11-chise-0_20-=ucs.
[chise/xemacs-chise.git.1] / lisp / iso8859-1.el
1 ;;; iso8859-1.el --- Set case and syntax tables for Latin 1
2
3 ;; Copyright (C) 1992, 1997 Free Software Foundation, Inc.
4
5 ;; Author: Jamie Zawinski <jwz@jwz.org>
6 ;; Created: 19-aug-92
7 ;; Maintainer: XEmacs Development Team
8 ;; Keywords: internal, dumped
9
10 ;; This file is part of XEmacs.
11
12 ;; XEmacs is free software; you can redistribute it and/or modify it
13 ;; under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; any later version.
16
17 ;; XEmacs is distributed in the hope that it will be useful, but
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20 ;; General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with XEmacs; see the file COPYING.  If not, write to the Free
24 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 ;; 02111-1307, USA.
26
27 ;;; Synched up with:  Not synched
28
29 ;;; Commentary:
30
31 ;; created by jwz, 19-aug-92.
32 ;; Sets the case and syntax tables for the ISO-8859/1 character set.
33
34 ;;; Code:
35
36 (let ((table (standard-syntax-table)))
37   ;;
38   ;; The symbol characters
39   ;;
40   (modify-syntax-entry ?\240 "_"     table)   ; nobreakspace
41   (modify-syntax-entry ?\241 "."     table)   ; exclamdown
42   (modify-syntax-entry ?\242 "_"     table)   ; cent
43   (modify-syntax-entry ?\243 "_"     table)   ; sterling
44   (modify-syntax-entry ?\244 "_"     table)   ; currency
45   (modify-syntax-entry ?\245 "_"     table)   ; yen
46   (modify-syntax-entry ?\246 "_"     table)   ; brokenbar
47   (modify-syntax-entry ?\247 "_"     table)   ; section
48   (modify-syntax-entry ?\250 "_"     table)   ; diaeresis
49   (modify-syntax-entry ?\251 "_"     table)   ; copyright
50   (modify-syntax-entry ?\252 "_"     table)   ; ordfeminine
51   (modify-syntax-entry ?\253 "(\273" table)   ; guillemotleft
52   (modify-syntax-entry ?\254 "_"     table)   ; notsign
53   (modify-syntax-entry ?\255 "_"     table)   ; hyphen
54   (modify-syntax-entry ?\256 "_"     table)   ; registered
55   (modify-syntax-entry ?\257 "_"     table)   ; macron
56   (modify-syntax-entry ?\260 "_"     table)   ; degree
57   (modify-syntax-entry ?\261 "_"     table)   ; plusminus
58   (modify-syntax-entry ?\262 "_"     table)   ; twosuperior
59   (modify-syntax-entry ?\263 "_"     table)   ; threesuperior
60   (modify-syntax-entry ?\264 "_"     table)   ; acute
61   (modify-syntax-entry ?\265 "_"     table)   ; mu
62   (modify-syntax-entry ?\266 "_"     table)   ; paragraph
63   (modify-syntax-entry ?\267 "_"     table)   ; periodcentered
64   (modify-syntax-entry ?\270 "_"     table)   ; cedilla
65   (modify-syntax-entry ?\271 "_"     table)   ; onesuperior
66   (modify-syntax-entry ?\272 "_"     table)   ; masculine
67   (modify-syntax-entry ?\273 ")\253" table)   ; guillemotright
68   (modify-syntax-entry ?\274 "_"     table)   ; onequarter
69   (modify-syntax-entry ?\275 "_"     table)   ; onehalf
70   (modify-syntax-entry ?\276 "_"     table)   ; threequarters
71   (modify-syntax-entry ?\277 "_"     table)   ; questiondown
72   ;;
73   ;; the upper-case characters (plus "multiply" and "ssharp") 
74   ;;
75   (modify-syntax-entry ?\300 "w" table)   ; Agrave
76   (modify-syntax-entry ?\301 "w" table)   ; Aacute
77   (modify-syntax-entry ?\302 "w" table)   ; Acircumflex
78   (modify-syntax-entry ?\303 "w" table)   ; Atilde
79   (modify-syntax-entry ?\304 "w" table)   ; Adiaeresis
80   (modify-syntax-entry ?\305 "w" table)   ; Aring
81   (modify-syntax-entry ?\306 "w" table)   ; AE
82   (modify-syntax-entry ?\307 "w" table)   ; Ccedilla
83   (modify-syntax-entry ?\310 "w" table)   ; Egrave
84   (modify-syntax-entry ?\311 "w" table)   ; Eacute
85   (modify-syntax-entry ?\312 "w" table)   ; Ecircumflex
86   (modify-syntax-entry ?\313 "w" table)   ; Ediaeresis
87   (modify-syntax-entry ?\314 "w" table)   ; Igrave
88   (modify-syntax-entry ?\315 "w" table)   ; Iacute
89   (modify-syntax-entry ?\316 "w" table)   ; Icircumflex
90   (modify-syntax-entry ?\317 "w" table)   ; Idiaeresis
91   (modify-syntax-entry ?\320 "w" table)   ; ETH
92   (modify-syntax-entry ?\321 "w" table)   ; Ntilde
93   (modify-syntax-entry ?\322 "w" table)   ; Ograve
94   (modify-syntax-entry ?\323 "w" table)   ; Oacute
95   (modify-syntax-entry ?\324 "w" table)   ; Ocircumflex
96   (modify-syntax-entry ?\325 "w" table)   ; Otilde
97   (modify-syntax-entry ?\326 "w" table)   ; Odiaeresis
98   (modify-syntax-entry ?\327 "_" table)   ; multiply
99   (modify-syntax-entry ?\330 "w" table)   ; Ooblique
100   (modify-syntax-entry ?\331 "w" table)   ; Ugrave
101   (modify-syntax-entry ?\332 "w" table)   ; Uacute
102   (modify-syntax-entry ?\333 "w" table)   ; Ucircumflex
103   (modify-syntax-entry ?\334 "w" table)   ; Udiaeresis
104   (modify-syntax-entry ?\335 "w" table)   ; Yacute
105   (modify-syntax-entry ?\336 "w" table)   ; THORN
106   (modify-syntax-entry ?\337 "w" table)   ; ssharp
107   ;;
108   ;; the lower-case characters (plus "division" and "ydiaeresis")
109   ;;
110   (modify-syntax-entry ?\340 "w" table)   ; agrave
111   (modify-syntax-entry ?\341 "w" table)   ; aacute
112   (modify-syntax-entry ?\342 "w" table)   ; acircumflex
113   (modify-syntax-entry ?\343 "w" table)   ; atilde
114   (modify-syntax-entry ?\344 "w" table)   ; adiaeresis
115   (modify-syntax-entry ?\345 "w" table)   ; aring
116   (modify-syntax-entry ?\346 "w" table)   ; ae
117   (modify-syntax-entry ?\347 "w" table)   ; ccedilla
118   (modify-syntax-entry ?\350 "w" table)   ; egrave
119   (modify-syntax-entry ?\351 "w" table)   ; eacute
120   (modify-syntax-entry ?\352 "w" table)   ; ecircumflex
121   (modify-syntax-entry ?\353 "w" table)   ; ediaeresis
122   (modify-syntax-entry ?\354 "w" table)   ; igrave
123   (modify-syntax-entry ?\355 "w" table)   ; iacute
124   (modify-syntax-entry ?\356 "w" table)   ; icircumflex
125   (modify-syntax-entry ?\357 "w" table)   ; idiaeresis
126   (modify-syntax-entry ?\360 "w" table)   ; eth
127   (modify-syntax-entry ?\361 "w" table)   ; ntilde
128   (modify-syntax-entry ?\362 "w" table)   ; ograve
129   (modify-syntax-entry ?\363 "w" table)   ; oacute
130   (modify-syntax-entry ?\364 "w" table)   ; ocircumflex
131   (modify-syntax-entry ?\365 "w" table)   ; otilde
132   (modify-syntax-entry ?\366 "w" table)   ; odiaeresis
133   (modify-syntax-entry ?\367 "_" table)   ; division
134   (modify-syntax-entry ?\370 "w" table)   ; ooblique
135   (modify-syntax-entry ?\371 "w" table)   ; ugrave
136   (modify-syntax-entry ?\372 "w" table)   ; uacute
137   (modify-syntax-entry ?\373 "w" table)   ; ucircumflex
138   (modify-syntax-entry ?\374 "w" table)   ; udiaeresis
139   (modify-syntax-entry ?\375 "w" table)   ; yacute
140   (modify-syntax-entry ?\376 "w" table)   ; thorn
141   (modify-syntax-entry ?\377 "w" table)   ; ydiaeresis
142   )
143
144 \f
145 (unless (featurep 'utf-2000)
146 (defconst iso8859/1-case-table nil
147   "The case table for ISO-8859/1 characters.")
148
149 ;;; This macro expands into
150 ;;;  (setq iso8859/1-case-table (purecopy '("..." nil nil nil)))
151 ;;; doing the computation of the case table at compile-time.
152
153 ((macro
154   . (lambda (&rest pairs)
155       (let ((downcase (make-string 256 0))
156             (i 0))
157         (while (< i 256)
158           (aset downcase i (if (and (>= i ?A) (<= i ?Z)) (+ i 32) i))
159           (setq i (1+ i)))
160         (while pairs
161           (aset downcase (car (car pairs)) (car (cdr (car pairs))))
162           (setq pairs (cdr pairs)))
163         (cons 'setq
164               (cons 'iso8859/1-case-table
165                     (list
166                      (list 'quote
167                            (list downcase nil nil nil))))))))
168  
169  (?\300  ?\340)         ; Agrave
170  (?\301  ?\341)         ; Aacute
171  (?\302  ?\342)         ; Acircumflex
172  (?\303  ?\343)         ; Atilde
173  (?\304  ?\344)         ; Adiaeresis
174  (?\305  ?\345)         ; Aring
175  (?\306  ?\346)         ; AE
176  (?\307  ?\347)         ; Ccedilla
177  (?\310  ?\350)         ; Egrave
178  (?\311  ?\351)         ; Eacute
179  (?\312  ?\352)         ; Ecircumflex
180  (?\313  ?\353)         ; Ediaeresis
181  (?\314  ?\354)         ; Igrave
182  (?\315  ?\355)         ; Iacute
183  (?\316  ?\356)         ; Icircumflex
184  (?\317  ?\357)         ; Idiaeresis
185  (?\320  ?\360)         ; ETH
186  (?\321  ?\361)         ; Ntilde
187  (?\322  ?\362)         ; Ograve
188  (?\323  ?\363)         ; Oacute
189  (?\324  ?\364)         ; Ocircumflex
190  (?\325  ?\365)         ; Otilde
191  (?\326  ?\366)         ; Odiaeresis
192  (?\330  ?\370)         ; Ooblique
193  (?\331  ?\371)         ; Ugrave
194  (?\332  ?\372)         ; Uacute
195  (?\333  ?\373)         ; Ucircumflex
196  (?\334  ?\374)         ; Udiaeresis
197  (?\335  ?\375)         ; Yacute
198  (?\336  ?\376)         ; THORN
199  )
200
201 (set-standard-case-table (mapcar 'copy-sequence iso8859/1-case-table))
202 )
203
204 (setq-default ctl-arrow 'iso-8859/1)
205
206 (provide 'iso8859-1)
207
208 ;;; iso8859-1.el ends here