Fix a bug in the state cache mechanism. Refactor this a bit.
[emacs.git] / lisp / obsolete / iso-insert.el
blob18cf87a4c6ffbd0397c660022d9b697da0d51409
1 ;;; iso-insert.el --- insert functions for ISO 8859/1 -*- coding: iso-8859-1;-*-
3 ;; Copyright (C) 1987, 1994, 2001-2013 Free Software Foundation, Inc.
5 ;; Author: Howard Gayle
6 ;; Maintainer: FSF
7 ;; Keywords: i18n
8 ;; Obsolete-since: 22.1
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
25 ;;; Commentary:
27 ;; Provides keys for inserting ISO Latin-1 characters. They use the
28 ;; prefix key C-x 8. Type C-x 8 C-h for a list.
30 ;;; Code:
32 (defun insert-no-break-space ()
33 (interactive "*")
34 (insert ?\ )
37 (defun insert-inverted-exclamation-mark ()
38 (interactive "*")
39 (insert ?\¡)
42 (defun insert-cent-sign ()
43 (interactive "*")
44 (insert ?\¢)
47 (defun insert-pound-sign ()
48 (interactive "*")
49 (insert ?\£)
52 (defun insert-general-currency-sign ()
53 (interactive "*")
54 (insert ?\¤)
57 (defun insert-yen-sign ()
58 (interactive "*")
59 (insert ?\¥)
62 (defun insert-broken-vertical-line ()
63 (interactive "*")
64 (insert ?\¦)
67 (defun insert-section-sign ()
68 (interactive "*")
69 (insert ?\§)
72 (defun insert-diaeresis ()
73 (interactive "*")
74 (insert ?\¨)
77 (defun insert-copyright-sign ()
78 (interactive "*")
79 (insert ?\©)
82 (defun insert-ordinal-indicator-feminine ()
83 (interactive "*")
84 (insert ?\ª)
87 (defun insert-angle-quotation-mark-left ()
88 (interactive "*")
89 (insert ?\«)
92 (defun insert-not-sign ()
93 (interactive "*")
94 (insert ?\¬)
97 (defun insert-soft-hyphen ()
98 (interactive "*")
99 (insert ?\­)
102 (defun insert-registered-sign ()
103 (interactive "*")
104 (insert ?\®)
107 (defun insert-macron ()
108 (interactive "*")
109 (insert ?\¯)
112 (defun insert-degree-sign ()
113 (interactive "*")
114 (insert ?\°)
117 (defun insert-plus-or-minus-sign ()
118 (interactive "*")
119 (insert ?\±)
122 (defun insert-superscript-two ()
123 (interactive "*")
124 (insert ?\²)
127 (defun insert-superscript-three ()
128 (interactive "*")
129 (insert ?\³)
132 (defun insert-acute-accent ()
133 (interactive "*")
134 (insert ?\´)
137 (defun insert-micro-sign ()
138 (interactive "*")
139 (insert ?\µ)
142 (defun insert-pilcrow ()
143 (interactive "*")
144 (insert ?\¶)
147 (defun insert-middle-dot ()
148 (interactive "*")
149 (insert ?\·)
152 (defun insert-cedilla ()
153 (interactive "*")
154 (insert ?\¸)
157 (defun insert-superscript-one ()
158 (interactive "*")
159 (insert ?\¹)
162 (defun insert-ordinal-indicator-masculine ()
163 (interactive "*")
164 (insert ?\º)
167 (defun insert-angle-quotation-mark-right ()
168 (interactive "*")
169 (insert ?\»)
172 (defun insert-fraction-one-quarter ()
173 (interactive "*")
174 (insert ?\¼)
177 (defun insert-fraction-one-half ()
178 (interactive "*")
179 (insert ?\½)
182 (defun insert-fraction-three-quarters ()
183 (interactive "*")
184 (insert ?\¾)
187 (defun insert-inverted-question-mark ()
188 (interactive "*")
189 (insert ?\¿)
192 (defun insert-A-grave ()
193 (interactive "*")
194 (insert ?\À)
197 (defun insert-A-acute ()
198 (interactive "*")
199 (insert ?\Á)
202 (defun insert-A-circumflex ()
203 (interactive "*")
204 (insert ?\Â)
207 (defun insert-A-tilde ()
208 (interactive "*")
209 (insert ?\Ã)
212 (defun insert-A-umlaut ()
213 (interactive "*")
214 (insert ?\Ä)
217 (defun insert-A-ring ()
218 (interactive "*")
219 (insert ?\Å)
222 (defun insert-AE ()
223 (interactive "*")
224 (insert ?\Æ)
227 (defun insert-C-cedilla ()
228 (interactive "*")
229 (insert ?\Ç)
232 (defun insert-E-grave ()
233 (interactive "*")
234 (insert ?\È)
237 (defun insert-E-acute ()
238 (interactive "*")
239 (insert ?\É)
242 (defun insert-E-circumflex ()
243 (interactive "*")
244 (insert ?\Ê)
247 (defun insert-E-umlaut ()
248 (interactive "*")
249 (insert ?\Ë)
252 (defun insert-I-grave ()
253 (interactive "*")
254 (insert ?\Ì)
257 (defun insert-I-acute ()
258 (interactive "*")
259 (insert ?\Í)
262 (defun insert-I-circumflex ()
263 (interactive "*")
264 (insert ?\Î)
267 (defun insert-I-umlaut ()
268 (interactive "*")
269 (insert ?\Ï)
272 (defun insert-D-stroke ()
273 (interactive "*")
274 (insert ?\Ð)
277 (defun insert-N-tilde ()
278 (interactive "*")
279 (insert ?\Ñ)
282 (defun insert-O-grave ()
283 (interactive "*")
284 (insert ?\Ò)
287 (defun insert-O-acute ()
288 (interactive "*")
289 (insert ?\Ó)
292 (defun insert-O-circumflex ()
293 (interactive "*")
294 (insert ?\Ô)
297 (defun insert-O-tilde ()
298 (interactive "*")
299 (insert ?\Õ)
302 (defun insert-O-umlaut ()
303 (interactive "*")
304 (insert ?\Ö)
307 (defun insert-multiplication-sign ()
308 (interactive "*")
309 (insert ?\×)
312 (defun insert-O-slash ()
313 (interactive "*")
314 (insert ?\Ø)
317 (defun insert-U-grave ()
318 (interactive "*")
319 (insert ?\Ù)
322 (defun insert-U-acute ()
323 (interactive "*")
324 (insert ?\Ú)
327 (defun insert-U-circumflex ()
328 (interactive "*")
329 (insert ?\Û)
332 (defun insert-U-umlaut ()
333 (interactive "*")
334 (insert ?\Ü)
337 (defun insert-Y-acute ()
338 (interactive "*")
339 (insert ?\Ý)
342 (defun insert-THORN ()
343 (interactive "*")
344 (insert ?\Þ)
347 (defun insert-ss ()
348 (interactive "*")
349 (insert ?\ß)
352 (defun insert-a-grave ()
353 (interactive "*")
354 (insert ?\à)
357 (defun insert-a-acute ()
358 (interactive "*")
359 (insert ?\á)
362 (defun insert-a-circumflex ()
363 (interactive "*")
364 (insert ?\â)
367 (defun insert-a-tilde ()
368 (interactive "*")
369 (insert ?\ã)
372 (defun insert-a-umlaut ()
373 (interactive "*")
374 (insert ?\ä)
377 (defun insert-a-ring ()
378 (interactive "*")
379 (insert ?\å)
382 (defun insert-ae ()
383 (interactive "*")
384 (insert ?\æ)
387 (defun insert-c-cedilla ()
388 (interactive "*")
389 (insert ?\ç)
392 (defun insert-e-grave ()
393 (interactive "*")
394 (insert ?\è)
397 (defun insert-e-acute ()
398 (interactive "*")
399 (insert ?\é)
402 (defun insert-e-circumflex ()
403 (interactive "*")
404 (insert ?\ê)
407 (defun insert-e-umlaut ()
408 (interactive "*")
409 (insert ?\ë)
412 (defun insert-i-grave ()
413 (interactive "*")
414 (insert ?\ì)
417 (defun insert-i-acute ()
418 (interactive "*")
419 (insert ?\í)
422 (defun insert-i-circumflex ()
423 (interactive "*")
424 (insert ?\î)
427 (defun insert-i-umlaut ()
428 (interactive "*")
429 (insert ?\ï)
432 (defun insert-d-stroke ()
433 (interactive "*")
434 (insert ?\ð)
437 (defun insert-n-tilde ()
438 (interactive "*")
439 (insert ?\ñ)
442 (defun insert-o-grave ()
443 (interactive "*")
444 (insert ?\ò)
447 (defun insert-o-acute ()
448 (interactive "*")
449 (insert ?\ó)
452 (defun insert-o-circumflex ()
453 (interactive "*")
454 (insert ?\ô)
457 (defun insert-o-tilde ()
458 (interactive "*")
459 (insert ?\õ)
462 (defun insert-o-umlaut ()
463 (interactive "*")
464 (insert ?\ö)
467 (defun insert-division-sign ()
468 (interactive "*")
469 (insert ?\÷)
472 (defun insert-o-slash ()
473 (interactive "*")
474 (insert ?\ø)
477 (defun insert-u-grave ()
478 (interactive "*")
479 (insert ?\ù)
482 (defun insert-u-acute ()
483 (interactive "*")
484 (insert ?\ú)
487 (defun insert-u-circumflex ()
488 (interactive "*")
489 (insert ?\û)
492 (defun insert-u-umlaut ()
493 (interactive "*")
494 (insert ?\ü)
497 (defun insert-y-acute ()
498 (interactive "*")
499 (insert ?\ý)
502 (defun insert-thorn ()
503 (interactive "*")
504 (insert ?\þ)
507 (defun insert-y-umlaut ()
508 (interactive "*")
509 (insert ?\ÿ)
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))
626 (defalias '8859-1-map 8859-1-map)
628 (provide 'iso-insert)
630 ;;; iso-insert.el ends here