import xemacs-21.2.37
[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 (defconst iso8859/1-case-table nil
146   "The case table for ISO-8859/1 characters.")
147
148 ;;; This macro expands into
149 ;;;  (setq iso8859/1-case-table (purecopy '("..." nil nil nil)))
150 ;;; doing the computation of the case table at compile-time.
151
152 ((macro
153   . (lambda (&rest pairs)
154       (let ((downcase (make-string 256 0))
155             (i 0))
156         (while (< i 256)
157           (aset downcase i (if (and (>= i ?A) (<= i ?Z)) (+ i 32) i))
158           (setq i (1+ i)))
159         (while pairs
160           (aset downcase (car (car pairs)) (car (cdr (car pairs))))
161           (setq pairs (cdr pairs)))
162         (cons 'setq
163               (cons 'iso8859/1-case-table
164                     (list
165                      (list 'quote
166                            (list downcase nil nil nil))))))))
167  
168  (?\300  ?\340)         ; Agrave
169  (?\301  ?\341)         ; Aacute
170  (?\302  ?\342)         ; Acircumflex
171  (?\303  ?\343)         ; Atilde
172  (?\304  ?\344)         ; Adiaeresis
173  (?\305  ?\345)         ; Aring
174  (?\306  ?\346)         ; AE
175  (?\307  ?\347)         ; Ccedilla
176  (?\310  ?\350)         ; Egrave
177  (?\311  ?\351)         ; Eacute
178  (?\312  ?\352)         ; Ecircumflex
179  (?\313  ?\353)         ; Ediaeresis
180  (?\314  ?\354)         ; Igrave
181  (?\315  ?\355)         ; Iacute
182  (?\316  ?\356)         ; Icircumflex
183  (?\317  ?\357)         ; Idiaeresis
184  (?\320  ?\360)         ; ETH
185  (?\321  ?\361)         ; Ntilde
186  (?\322  ?\362)         ; Ograve
187  (?\323  ?\363)         ; Oacute
188  (?\324  ?\364)         ; Ocircumflex
189  (?\325  ?\365)         ; Otilde
190  (?\326  ?\366)         ; Odiaeresis
191  (?\330  ?\370)         ; Ooblique
192  (?\331  ?\371)         ; Ugrave
193  (?\332  ?\372)         ; Uacute
194  (?\333  ?\373)         ; Ucircumflex
195  (?\334  ?\374)         ; Udiaeresis
196  (?\335  ?\375)         ; Yacute
197  (?\336  ?\376)         ; THORN
198  )
199
200 (set-standard-case-table (mapcar 'copy-sequence iso8859/1-case-table))
201
202 (setq-default ctl-arrow 'iso-8859/1)
203
204 (provide 'iso8859-1)
205
206 ;;; iso8859-1.el ends here