| 1 | ;;; iso-transl.el --- keyboard input definitions for ISO 8859-1 -*- coding: iso-8859-1 -*- |
| 2 | |
| 3 | ;; Copyright (C) 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 |
| 4 | ;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 5 | |
| 6 | ;; Author: Howard Gayle |
| 7 | ;; Maintainer: FSF |
| 8 | ;; Keywords: i18n |
| 9 | |
| 10 | ;; This file is part of GNU Emacs. |
| 11 | |
| 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. |
| 16 | |
| 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. |
| 21 | |
| 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/>. |
| 24 | |
| 25 | ;;; Commentary: |
| 26 | |
| 27 | ;; Loading this package defines three ways of entering the non-ASCII |
| 28 | ;; printable characters with codes above 127: the prefix C-x 8, or the |
| 29 | ;; Alt key, or a dead accent key. For example, you can enter uppercase |
| 30 | ;; A-umlaut as `C-x 8 " A' or `Alt-" A' (if you have an Alt key) or |
| 31 | ;; `umlaut A' (if you have an umlaut/diaeresis key). |
| 32 | |
| 33 | ;; C-x 8 is set up to autoload this package, |
| 34 | ;; but Alt keys and dead accent keys are only defined |
| 35 | ;; once you have loaded the package. It is nontrivial |
| 36 | ;; to make all of the Alt keys autoload, and it is not clear |
| 37 | ;; that the dead accent keys SHOULD autoload this package. |
| 38 | |
| 39 | ;;; Code: |
| 40 | |
| 41 | ;;; Provide some binding for startup: |
| 42 | ;;;###autoload (or key-translation-map (setq key-translation-map (make-sparse-keymap))) |
| 43 | ;;;###autoload (define-key key-translation-map "\C-x8" 'iso-transl-ctl-x-8-map) |
| 44 | ;;;###autoload (autoload 'iso-transl-ctl-x-8-map "iso-transl" "Keymap for C-x 8 prefix." t 'keymap) |
| 45 | |
| 46 | (defvar iso-transl-dead-key-alist |
| 47 | '((?\' . mute-acute) |
| 48 | (?\` . mute-grave) |
| 49 | (?\" . mute-diaeresis) |
| 50 | (?^ . mute-asciicircum) |
| 51 | (?\~ . mute-asciitilde) |
| 52 | (?\' . dead-acute) |
| 53 | (?\` . dead-grave) |
| 54 | (?\" . dead-diaeresis) |
| 55 | (?^ . dead-asciicircum) |
| 56 | (?\~ . dead-asciitilde) |
| 57 | (?^ . dead-circum) |
| 58 | (?^ . dead-circumflex) |
| 59 | (?\~ . dead-tilde) |
| 60 | ;; Someone reports that these keys don't work if shifted. |
| 61 | ;; This might fix it--no word yet. |
| 62 | (?\' . S-dead-acute) |
| 63 | (?\` . S-dead-grave) |
| 64 | (?\" . S-dead-diaeresis) |
| 65 | (?^ . S-dead-asciicircum) |
| 66 | (?\~ . S-dead-asciitilde) |
| 67 | (?^ . S-dead-circum) |
| 68 | (?^ . S-dead-circumflex) |
| 69 | (?\~ . S-dead-tilde)) |
| 70 | "Mapping of ASCII characters to their corresponding dead-key symbols.") |
| 71 | |
| 72 | ;; The two-character mnemonics are intended to be available in all languages. |
| 73 | ;; The ones beginning with `*' have one-character synonyms, but a |
| 74 | ;; language-specific table might override the short form for its own use. |
| 75 | |
| 76 | (defvar iso-transl-char-map |
| 77 |