Some fixes to follow coding conventions in files maintained by FSF.
[bpt/emacs.git] / lisp / international / iso-insert.el
1 ;;; iso-insert.el --- insert functions for ISO 8859/1
2
3 ;; Copyright (C) 1987, 1994 Free Software Foundation, Inc.
4
5 ;; Author: Howard Gayle
6 ;; Maintainer: FSF
7 ;; Keywords: i18n
8
9 ;; This file is part of GNU Emacs.
10
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; any later version.
15
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
25
26 ;;; Commentary:
27
28 ;; Written by Howard Gayle. See case-table.el for details.
29
30 ;;; Code:
31
32 (defun insert-no-break-space ()
33 (interactive "*")
34 (insert (string 160))
35 )
36
37 (defun insert-inverted-exclamation-mark ()
38 (interactive "*")
39 (insert (string 161))
40 )
41
42 (defun insert-cent-sign ()
43 (interactive "*")
44 (insert (string 162))
45 )
46
47 (defun insert-pound-sign ()
48 (interactive "*")
49 (insert (string 163))
50 )
51
52 (defun insert-general-currency-sign ()
53 (interactive "*")
54 (insert (string 164))
55 )
56
57 (defun insert-yen-sign ()
58 (interactive "*")
59 (insert (string 165))
60 )
61
62 (defun insert-broken-vertical-line ()
63 (interactive "*")
64 (insert (string 166))
65 )
66
67 (defun insert-section-sign ()
68 (interactive "*")
69 (insert (string 167))
70 )
71
72 (defun insert-diaeresis ()
73 (interactive "*")
74 (insert (string 168))
75 )
76
77 (defun insert-copyright-sign ()
78 (interactive "*")
79 (insert (string 169))
80 )
81
82 (defun insert-ordinal-indicator-feminine ()
83 (interactive "*")
84 (insert (string 170))
85 )
86
87 (defun insert-angle-quotation-mark-left ()
88 (interactive "*")
89 (insert (string 171))
90 )
91
92 (defun insert-not-sign ()
93 (interactive "*")
94 (insert (string 172))
95 )
96
97 (defun insert-soft-hyphen ()
98 (interactive "*")
99 (insert (string 173))
100 )
101
102 (defun insert-registered-sign ()
103 (interactive "*")
104 (insert (string 174))
105 )
106
107 (defun insert-macron ()
108 (interactive "*")
109 (insert (string 175))
110 )
111
112 (defun insert-degree-sign ()
113 (interactive "*")
114 (insert (string 176))
115 )
116
117 (defun insert-plus-or-minus-sign ()
118 (interactive "*")
119 (insert (string 177))
120 )
121
122 (defun insert-superscript-two ()
123 (interactive "*")
124 (insert (string 178))
125 )
126
127 (defun insert-superscript-three ()
128 (interactive "*")
129 (insert (string 179))
130 )
131
132 (defun insert-acute-accent ()
133 (interactive "*")
134 (insert (string 180))
135 )
136
137 (defun insert-micro-sign ()
138 (interactive "*")
139 (insert (string 181))
140 )
141
142 (defun insert-pilcrow ()
143 (interactive "*")
144 (insert (string 182))
145 )
146
147 (defun insert-middle-dot ()
148 (interactive "*")
149 (insert (string 183))
150 )
151
152 (defun insert-cedilla ()
153 (interactive "*")
154 (insert (string 184))
155 )
156
157 (defun insert-superscript-one ()
158 (interactive "*")
159 (insert (string 185))
160 )
161
162 (defun insert-ordinal-indicator-masculine ()
163 (interactive "*")
164 (insert (string 186))
165 )
166
167 (defun insert-angle-quotation-mark-right ()
168 (interactive "*")
169 (insert (string 187))
170 )
171
172 (defun insert-fraction-one-quarter ()
173 (interactive "*")
174 (insert (string 188))
175 )
176
177 (defun insert-fraction-one-half ()
178 (interactive "*")
179 (insert (string 189))
180 )
181
182 (defun insert-fraction-three-quarters ()
183 (interactive "*")
184 (insert (string 190))
185 )
186
187 (defun insert-inverted-question-mark ()
188 (interactive "*")
189 (insert (string 191))
190 )
191
192 (defun insert-A-grave ()
193 (interactive "*")
194 (insert (string 192))
195 )
196
197 (defun insert-A-acute ()
198 (interactive "*")
199 (insert (string 193))
200 )
201
202 (defun insert-A-circumflex ()
203 (interactive "*")
204 (insert (string 194))
205 )
206
207 (defun insert-A-tilde ()
208 (interactive "*")
209 (insert (string 195))
210 )
211
212 (defun insert-A-umlaut ()
213 (interactive "*")
214 (insert (string 196))
215 )
216
217 (defun insert-A-ring ()
218 (interactive "*")
219 (insert (string 197))
220 )
221
222 (defun insert-AE ()
223 (interactive "*")
224 (insert (string 198))
225 )
226
227 (defun insert-C-cedilla ()
228 (interactive "*")
229 (insert (string 199))
230 )
231
232 (defun insert-E-grave ()
233 (interactive "*")
234 (insert (string 200))
235 )
236
237 (defun insert-E-acute ()
238 (interactive "*")
239 (insert (string 201))
240 )
241
242 (defun insert-E-circumflex ()
243 (interactive "*")
244 (insert (string 202))
245 )
246
247 (defun insert-E-umlaut ()
248 (interactive "*")
249 (insert (string 203))
250 )
251
252 (defun insert-I-grave ()
253 (interactive "*")
254 (insert (string 204))
255 )
256
257 (defun insert-I-acute ()
258 (interactive "*")
259 (insert (string 205))
260 )
261
262 (defun insert-I-circumflex ()
263 (interactive "*")
264 (insert (string 206))
265 )
266
267 (defun insert-I-umlaut ()
268 (interactive "*")
269 (insert (string 207))
270 )
271
272 (defun insert-D-stroke ()
273 (interactive "*")
274 (insert (string 208))
275 )
276
277 (defun insert-N-tilde ()
278 (interactive "*")
279 (insert (string 209))
280 )
281
282 (defun insert-O-grave ()
283 (interactive "*")
284 (insert (string 210))
285 )
286
287 (defun insert-O-acute ()
288 (interactive "*")
289 (insert (string 211))
290 )
291
292 (defun insert-O-circumflex ()
293 (interactive "*")
294 (insert (string 212))
295 )
296
297 (defun insert-O-tilde ()
298 (interactive "*")
299 (insert (string 213))
300 )
301
302 (defun insert-O-umlaut ()
303 (interactive "*")
304 (insert (string 214))
305 )
306
307 (defun insert-multiplication-sign ()
308 (interactive "*")
309 (insert (string 215))
310 )
311
312 (defun insert-O-slash ()
313 (interactive "*")
314 (insert (string 216))
315 )
316
317 (defun insert-U-grave ()
318 (interactive "*")
319 (insert (string 217))
320 )
321
322 (defun insert-U-acute ()
323 (interactive "*")
324 (insert (string 218))
325 )
326
327 (defun insert-U-circumflex ()
328 (interactive "*")
329 (insert (string 219))
330 )
331
332 (defun insert-U-umlaut ()
333 (interactive "*")
334 (insert (string 220))
335 )
336
337 (defun insert-Y-acute ()
338 (interactive "*")
339 (insert (string 221))
340 )
341
342 (defun insert-THORN ()
343 (interactive "*")
344 (insert (string 222))
345 )
346
347 (defun insert-ss ()
348 (interactive "*")
349 (insert (string 223))
350 )
351
352 (defun insert-a-grave ()
353 (interactive "*")
354 (insert (string 224))
355 )
356
357 (defun insert-a-acute ()
358 (interactive "*")
359 (insert (string 225))
360 )
361
362 (defun insert-a-circumflex ()
363 (interactive "*")
364 (insert (string 226))
365 )
366
367 (defun insert-a-tilde ()
368 (interactive "*")
369 (insert (string 227))
370 )
371
372 (defun insert-a-umlaut ()
373 (interactive "*")
374 (insert (string 228))
375 )
376
377 (defun insert-a-ring ()
378 (interactive "*")
379 (insert (string 229))
380 )
381
382 (defun insert-ae ()
383 (interactive "*")
384 (insert (string 230))
385 )
386
387 (defun insert-c-cedilla ()
388 (interactive "*")
389 (insert (string 231))
390 )
391
392 (defun insert-e-grave ()
393 (interactive "*")
394 (insert (string 232))
395 )
396
397 (defun insert-e-acute ()
398 (interactive "*")
399 (insert (string 233))
400 )
401
402 (defun insert-e-circumflex ()
403 (interactive "*")
404 (insert (string 234))
405 )
406
407 (defun insert-e-umlaut ()
408 (interactive "*")
409 (insert (string 235))
410 )
411
412 (defun insert-i-grave ()
413 (interactive "*")
414 (insert (string 236))
415 )
416
417 (defun insert-i-acute ()
418 (interactive "*")
419 (insert (string 237))
420 )
421
422 (defun insert-i-circumflex ()
423 (interactive "*")
424 (insert (string 238))
425 )
426
427 (defun insert-i-umlaut ()
428 (interactive "*")
429 (insert (string 239))
430 )
431
432 (defun insert-d-stroke ()
433 (interactive "*")
434 (insert (string 240))
435 )
436
437 (defun insert-n-tilde ()
438 (interactive "*")
439 (insert (string 241))
440 )
441
442 (defun insert-o-grave ()
443 (interactive "*")
444 (insert (string 242))
445 )
446
447 (defun insert-o-acute ()
448 (interactive "*")
449 (insert (string 243))
450 )
451
452 (defun insert-o-circumflex ()
453 (interactive "*")
454 (insert (string 244))
455 )
456
457 (defun insert-o-tilde ()
458 (interactive "*")
459 (insert (string 245))
460 )
461
462 (defun insert-o-umlaut ()
463 (interactive "*")
464 (insert (string 246))
465 )
466
467 (defun insert-division-sign ()
468 (interactive "*")
469 (insert (string 247))
470 )
471
472 (defun insert-o-slash ()
473 (interactive "*")
474 (insert (string 248))
475 )
476
477 (defun insert-u-grave ()
478 (interactive "*")
479 (insert (string 249))
480 )
481
482 (defun insert-u-acute ()
483 (interactive "*")
484 (insert (string 250))
485 )
486
487 (defun insert-u-circumflex ()
488 (interactive "*")
489 (insert (string 251))
490 )
491
492 (defun insert-u-umlaut ()
493 (interactive "*")
494 (insert (string 252))
495 )
496
497 (defun insert-y-acute ()
498 (interactive "*")
499 (insert (string 253))
500 )
501
502 (defun insert-thorn ()
503 (interactive "*")
504 (insert (string 254))
505 )
506
507 (defun insert-y-umlaut ()
508 (interactive "*")
509 (insert (string 255))
510 )
511
512 (defvar 8859-1-map nil "Keymap for ISO 8859/1 character insertion.")
513 (if 8859-1-map nil
514 (setq 8859-1-map (make-keymap))
515 (define-key 8859-1-map " " 'insert-no-break-space)
516 (define-key 8859-1-map "!" 'insert-inverted-exclamation-mark)
517 (define-key 8859-1-map "\"" (make-sparse-keymap))
518 (define-key 8859-1-map "\"\"" 'insert-diaeresis)
519 (define-key 8859-1-map "\"A" 'insert-A-umlaut)
520 (define-key 8859-1-map "\"E" 'insert-E-umlaut)
521 (define-key 8859-1-map "\"I" 'insert-I-umlaut)
522 (define-key 8859-1-map "\"O" 'insert-O-umlaut)
523 (define-key 8859-1-map "\"U" 'insert-U-umlaut)
524 (define-key 8859-1-map "\"a" 'insert-a-umlaut)
525 (define-key 8859-1-map "\"e" 'insert-e-umlaut)
526 (define-key 8859-1-map "\"i" 'insert-i-umlaut)
527 (define-key 8859-1-map "\"o" 'insert-o-umlaut)
528 (define-key 8859-1-map "\"u" 'insert-u-umlaut)
529 (define-key 8859-1-map "\"y" 'insert-y-umlaut)
530 (define-key 8859-1-map "'" (make-sparse-keymap))
531 (define-key 8859-1-map "''" 'insert-acute-accent)
532 (define-key 8859-1-map "'A" 'insert-A-acute)
533 (define-key 8859-1-map "'E" 'insert-E-acute)
534 (define-key 8859-1-map "'I" 'insert-I-acute)
535 (define-key 8859-1-map "'O" 'insert-O-acute)
536 (define-key 8859-1-map "'U" 'insert-U-acute)
537 (define-key 8859-1-map "'Y" 'insert-Y-acute)
538 (define-key 8859-1-map "'a" 'insert-a-acute)
539 (define-key 8859-1-map "'e" 'insert-e-acute)
540 (define-key 8859-1-map "'i" 'insert-i-acute)
541 (define-key 8859-1-map "'o" 'insert-o-acute)
542 (define-key 8859-1-map "'u" 'insert-u-acute)
543 (define-key 8859-1-map "'y" 'insert-y-acute)
544 (define-key 8859-1-map "$" 'insert-general-currency-sign)
545 (define-key 8859-1-map "+" 'insert-plus-or-minus-sign)
546 (define-key 8859-1-map "," (make-sparse-keymap))
547 (define-key 8859-1-map ",," 'insert-cedilla)
548 (define-key 8859-1-map ",C" 'insert-C-cedilla)
549 (define-key 8859-1-map ",c" 'insert-c-cedilla)
550 (define-key 8859-1-map "-" 'insert-soft-hyphen)
551 (define-key 8859-1-map "." 'insert-middle-dot)
552 (define-key 8859-1-map "/" (make-sparse-keymap))
553 (define-key 8859-1-map "//" 'insert-division-sign)
554 (define-key 8859-1-map "/O" 'insert-O-slash)
555 (define-key 8859-1-map "/o" 'insert-o-slash)
556 (define-key 8859-1-map "1" (make-sparse-keymap))
557 (define-key 8859-1-map "1/" (make-sparse-keymap))
558 (define-key 8859-1-map "1/2" 'insert-fraction-one-half)
559 (define-key 8859-1-map "1/4" 'insert-fraction-one-quarter)
560 (define-key 8859-1-map "3" (make-sparse-keymap))
561 (define-key 8859-1-map "3/" (make-sparse-keymap))
562 (define-key 8859-1-map "3/4" 'insert-fraction-three-quarters)
563 (define-key 8859-1-map "<" 'insert-angle-quotation-mark-left)
564 (define-key 8859-1-map "=" 'insert-macron)
565 (define-key 8859-1-map ">" 'insert-angle-quotation-mark-right)
566 (define-key 8859-1-map "?" 'insert-inverted-question-mark)
567 (define-key 8859-1-map "A" 'insert-A-ring)
568 (define-key 8859-1-map "E" 'insert-AE)
569 (define-key 8859-1-map "C" 'insert-copyright-sign)
570 (define-key 8859-1-map "D" 'insert-D-stroke)
571 (define-key 8859-1-map "L" 'insert-pound-sign)
572 (define-key 8859-1-map "P" 'insert-pilcrow)
573 (define-key 8859-1-map "R" 'insert-registered-sign)
574 (define-key 8859-1-map "S" 'insert-section-sign)
575 (define-key 8859-1-map "T" 'insert-THORN)
576 (define-key 8859-1-map "Y" 'insert-yen-sign)
577 (define-key 8859-1-map "^" (make-sparse-keymap))
578 (define-key 8859-1-map "^1" 'insert-superscript-one)
579 (define-key 8859-1-map "^2" 'insert-superscript-two)
580 (define-key 8859-1-map "^3" 'insert-superscript-three)
581 (define-key 8859-1-map "^A" 'insert-A-circumflex)
582 (define-key 8859-1-map "^E" 'insert-E-circumflex)
583 (define-key 8859-1-map "^I" 'insert-I-circumflex)
584 (define-key 8859-1-map "^O" 'insert-O-circumflex)
585 (define-key 8859-1-map "^U" 'insert-U-circumflex)
586 (define-key 8859-1-map "^a" 'insert-a-circumflex)
587 (define-key 8859-1-map "^e" 'insert-e-circumflex)
588 (define-key 8859-1-map "^i" 'insert-i-circumflex)
589 (define-key 8859-1-map "^o" 'insert-o-circumflex)
590 (define-key 8859-1-map "^u" 'insert-u-circumflex)
591 (define-key 8859-1-map "_" (make-sparse-keymap))
592 (define-key 8859-1-map "_a" 'insert-ordinal-indicator-feminine)
593 (define-key 8859-1-map "_o" 'insert-ordinal-indicator-masculine)
594 (define-key 8859-1-map "`" (make-sparse-keymap))
595 (define-key 8859-1-map "`A" 'insert-A-grave)
596 (define-key 8859-1-map "`E" 'insert-E-grave)
597 (define-key 8859-1-map "`I" 'insert-I-grave)
598 (define-key 8859-1-map "`O" 'insert-O-grave)
599 (define-key 8859-1-map "`U" 'insert-U-grave)
600 (define-key 8859-1-map "`a" 'insert-a-grave)
601 (define-key 8859-1-map "`e" 'insert-e-grave)
602 (define-key 8859-1-map "`i" 'insert-i-grave)
603 (define-key 8859-1-map "`o" 'insert-o-grave)
604 (define-key 8859-1-map "`u" 'insert-u-grave)
605 (define-key 8859-1-map "a" 'insert-a-ring)
606 (define-key 8859-1-map "e" 'insert-ae)
607 (define-key 8859-1-map "c" 'insert-cent-sign)
608 (define-key 8859-1-map "d" 'insert-d-stroke)
609 (define-key 8859-1-map "o" 'insert-degree-sign)
610 (define-key 8859-1-map "s" 'insert-ss)
611 (define-key 8859-1-map "t" 'insert-thorn)
612 (define-key 8859-1-map "u" 'insert-micro-sign)
613 (define-key 8859-1-map "x" 'insert-multiplication-sign)
614 (define-key 8859-1-map "|" 'insert-broken-vertical-line)
615 (define-key 8859-1-map "~" (make-sparse-keymap))
616 (define-key 8859-1-map "~A" 'insert-A-tilde)
617 (define-key 8859-1-map "~N" 'insert-N-tilde)
618 (define-key 8859-1-map "~O" 'insert-O-tilde)
619 (define-key 8859-1-map "~a" 'insert-a-tilde)
620 (define-key 8859-1-map "~n" 'insert-n-tilde)
621 (define-key 8859-1-map "~o" 'insert-o-tilde)
622 (define-key 8859-1-map "~~" 'insert-not-sign)
623 (if (not (lookup-key global-map "\C-x8"))
624 (define-key global-map "\C-x8" 8859-1-map))
625 )
626 (defalias '8859-1-map 8859-1-map)
627
628 (provide 'iso-insert)
629
630 ;;; iso-insert.el ends here