annotate lisp/x-compose.el @ 4570:e6a7054a9c30

Add check-coding-systems-region, test it and others, fix some bugs. tests/ChangeLog addition: 2008-12-28 Aidan Kehoe <kehoea@parhasard.net> * automated/query-coding-tests.el: Add tests for #'unencodable-char-position, #'check-coding-systems-region, #'encode-coding-char. Remove some debugging statements. lisp/ChangeLog addition: 2008-12-28 Aidan Kehoe <kehoea@parhasard.net> * coding.el (query-coding-region): (query-coding-string): Make these defsubsts, they're short enough and they're called explicitly rarely enough that it make some sense. The alternative would be compiler macros that avoid the binding of the arguments. (unencodable-char-position): Document where the docstring and API are from. Correct a special case for zero--check-argument-type returns nil when it succeeds, we can't usefully chain its result in an and here. (check-coding-systems-region): New. API taken from GNU; docstring and implementation are independent. (encode-coding-char): Add an optional third argument, as used by recent GNU. Document the origen of the docstring. (default-query-coding-region): Add a short docstring to the non-Mule implementation of this function. * unicode.el: Don't set the query-coding-function property for unicode coding systems if we're on non-mule. Unintern unicode-query-coding-region, unicode-query-coding-skip-chars-arg in the same context.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 28 Dec 2008 22:51:14 +0000
parents e34711681f30
children fdc76fec36d3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 ;;; x-compose.el --- Compose-key processing in XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
3 ;; Copyright (C) 1992, 1993, 1997, 2005 Free Software Foundation, Inc.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 ;; Author: Jamie Zawinski <jwz@jwz.org>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 ;; Maintainer: XEmacs Development Team
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 ;; Rewritten by Martin Buchholz far too many times.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 ;;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 ;; Changed: 11 Jun 1997 by Heiko Muenkel <muenkel@tnt.uni-hannover.de>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 ;; The degree sign couldn't be inserted with the old version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 ;; Keywords: i18n
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ;; This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 ;; XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 ;; under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 ;; the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 ;; any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 ;; XEmacs is distributed in the hope that it will be useful, but
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 ;; General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 ;; You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 ;; along with XEmacs; see the file COPYING. If not, write to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 ;; Boston, MA 02111-1307, USA.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 ;;; Synched up with: Not in FSF.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 ;;; Commentary:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 ;; created by jwz, 14-jun-92.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 ;;; changed by Jan Vroonhof, July 1997: Use function-key-map instead
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 ;;; of global map.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 ;;; Preliminary support for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 ;;; XFree86 deadkeys
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 ;; This file implements DEC-, OpenWindows-, and HP-compatible "Compose"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 ;; processing for XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 ;; If you are running a version of X which already does compose processing,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 ;; then you don't need this file. But the MIT R4 and R5 distributions don't
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 ;; do compose processing, so you may want to fake it by using this code.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 ;; The basic idea is that there are several ways to generate keysyms which
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 ;; do not have keys devoted to them on your keyboard.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 ;; The first method is by using "dead" keys. A dead key is a key which,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 ;; when typed, does not insert a character. Instead it modifies the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 ;; following character typed. So if you typed "dead-tilde" followed by "A",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 ;; then "A-tilde" would be inserted. Of course, this requires you to modify
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 ;; your keyboard to include a "dead-tilde" key on it somewhere.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 ;; The second method is by using a "Compose" key. With a Compose key, you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 ;; would type "Compose" then "tilde" then "A" to insert "A-tilde".
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 ;; There are a small number of dead keys: acute, grave, cedilla, diaeresis,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 ;; circumflex, tilde, and ring. There are a larger number of accented and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 ;; other characters accessible via the Compose key, so both are useful.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 ;; To use this code, you will need to have a Compose key on your keyboard.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 ;; The default configuration of most X keyboards doesn't contain one. You
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 ;; can, for example, turn the right "Meta" key into a "Compose" key with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 ;; this command:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 ;; xmodmap -e "remove mod1 = Meta_R" -e "keysym Meta_R = Multi_key"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 ;; Multi-key is the name that X (and emacs) know the "Compose" key by.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 ;; The "remove..." command is necessary because the "Compose" key must not
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 ;; have any modifier bits associated with it. This exact command may not
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 ;; work, depending on what system and keyboard you are using. If it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 ;; doesn't, you'll have to read the man page for xmodmap. You might want
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 ;; to get the "xkeycaps" program from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 ;; <URL:http://www.jwz.org/xkeycaps/>,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 ;; which is a graphical front end to xmodmap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 ;; that hides xmodmap's arcane syntax from you.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 ;; If for some reason you don't want to have a dedicated compose key on your
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 ;; keyboard, you can use some other key as the prefix. For example, to make
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 ;; "Meta-Shift-C" act as a compose key (so that "M-C , c" would insert the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 ;; character "ccedilla") you could do
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 ;; (global-set-key "\M-C" compose-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 ;; I believe the bindings encoded in this file are the same as those used
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 ;; by OpenWindows versions 2 and 3, and DEC VT320 terminals. Please let me
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 ;; know if you think otherwise.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 ;; Much thanks to Justin Bur <justin@crim.ca> for helping me understand how
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 ;; this stuff is supposed to work.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 ;; You also might want to consider getting Justin's patch for the MIT Xlib
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 ;; that implements compose processing in the library. This will enable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 ;; compose processing in applications other than emacs as well. You can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 ;; get it from export.lcs.mit.edu in contrib/compose.tar.Z.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 ;; This code has one feature that a more "builtin" Compose mechanism could
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 ;; not have: at any point you can type C-h to get a list of the possible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 ;; completions of what you have typed so far.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
103 ;; Giacomo Boffi's problem of
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
104 ;; 20050324103919.8D22E4901@boffi95.stru.polimi.it is caused by Xlib doing
4477
e34711681f30 Don't determine whether to call general device-type code at startup,
Aidan Kehoe <kehoea@parhasard.net>
parents: 3459
diff changeset
105 ;; the compose processing. To turn that off, I'm not certain what's
e34711681f30 Don't determine whether to call general device-type code at startup,
Aidan Kehoe <kehoea@parhasard.net>
parents: 3459
diff changeset
106 ;; possible, beyond making C the current locale.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
108 ;;; Code:
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 (macrolet
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 ((define-compose-map (keymap-symbol)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 `(progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 (defconst ,keymap-symbol (make-sparse-keymap ',keymap-symbol))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 ;; Required to tell XEmacs the keymaps were actually autoloaded.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 ;; #### Make this unnecessary!
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 (fset ',keymap-symbol ,keymap-symbol))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 (define-compose-map compose-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 (define-compose-map compose-acute-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 (define-compose-map compose-grave-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 (define-compose-map compose-cedilla-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 (define-compose-map compose-diaeresis-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 (define-compose-map compose-circumflex-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 (define-compose-map compose-tilde-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 (define-compose-map compose-ring-map))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 (define-key compose-map 'acute compose-acute-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 (define-key compose-map 'grave compose-grave-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 (define-key compose-map 'cedilla compose-cedilla-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 (define-key compose-map 'diaeresis compose-diaeresis-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 (define-key compose-map 'circumflex compose-circumflex-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 (define-key compose-map 'tilde compose-tilde-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 (define-key compose-map 'degree compose-ring-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 ;;(define-key function-key-map [multi-key] compose-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 ;; The following is necessary, because one can't rebind [degree]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 ;; and use it to insert the degree sign!
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 ;;(defun compose-insert-degree ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 ;; "Inserts a degree sign."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 ;; (interactive)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 ;; (insert ?\260))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 (define-key compose-map [acute] compose-acute-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 (define-key compose-map [?'] compose-acute-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 (define-key compose-map [grave] compose-grave-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 (define-key compose-map [?`] compose-grave-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 (define-key compose-map [cedilla] compose-cedilla-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 (define-key compose-map [?,] compose-cedilla-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 (define-key compose-map [diaeresis] compose-diaeresis-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 (define-key compose-map [?\"] compose-diaeresis-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 (define-key compose-map [circumflex] compose-circumflex-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 (define-key compose-map [?^] compose-circumflex-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 (define-key compose-map [tilde] compose-tilde-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 (define-key compose-map [~] compose-tilde-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 (define-key compose-map [degree] compose-ring-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 (define-key compose-map [?*] compose-ring-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 ;;; The contents of the "dead key" maps. These are shared by the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 ;;; compose-map.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
163 ;;; These used to all have nice readable X11-oriented keysym names as the
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
164 ;;; macro definition in the third argument, but I moved the interpretation
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
165 ;;; of those mappings (that is, Aacute to \301, &c.) to runtime in the X11
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
166 ;;; code on first sight of the symbols--which is the more general solution,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
167 ;;; what with Unicode keysyms, publishing, technical and so on, there's no
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
168 ;;; need to have them hanging around as symbols all the time--so they're no
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
169 ;;; longer available to Lisp before X11 sees them, something this relied on.
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
170
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
171 ;;; The transformation was done like so;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
172
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
173 ;;; (while (re-search-forward "\\[\\([a-zA-Z]+\\)\\])$" nil t)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
174 ;;; (replace-match (format "(?\\%o)"
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
175 ;;; (get (intern (match-string 1)) 'character-of-keysym))
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
176 ;;; t t nil 1))
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
177
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
178 ;;; with a lot of repeated calling of setxkbmap to esoteric keymaps--so
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
179 ;;; x_reset_key_mapping gets called for all the keys on the keyboard--yacute
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
180 ;;; getting picked up from the Czech keymap, idiaeresis from the Dutch one,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
181 ;;; and many more (al, ca, cz, de, dvorak, ee, es, fi, fr, hu,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
182 ;;; ie(UnicodeExpert), it, nl, pt, ro, tr, us, vn, if it interests you.)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
183
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
184 ;;; The parentheses inside the vector are because otherwise the macro gets
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
185 ;;; interpreted as a meta character, the Latin-1 codes being in exactly that
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
186 ;;; range. Perhaps that bears documenting somewhere. Also, why is help
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
187 ;;; turned off for these (x-compose) sequences by default?
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
188
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
189 ;;; (Aidan Kehoe, 2005-05-18)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
190
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 (define-key compose-acute-map [space] "'")
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
192 (define-key compose-acute-map [?'] [(?\264)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
193 (define-key compose-acute-map [?A] [(?\301)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
194 (define-key compose-acute-map [E] [(?\311)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
195 (define-key compose-acute-map [I] [(?\315)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
196 (define-key compose-acute-map [O] [(?\323)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
197 (define-key compose-acute-map [U] [(?\332)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
198 (define-key compose-acute-map [Y] [(?\335)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
199 (define-key compose-acute-map [a] [(?\341)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
200 (define-key compose-acute-map [e] [(?\351)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
201 (define-key compose-acute-map [i] [(?\355)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
202 (define-key compose-acute-map [o] [(?\363)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
203 (define-key compose-acute-map [u] [(?\372)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
204 (define-key compose-acute-map [y] [(?\375)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 (define-key compose-grave-map [space] "`")
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
207 (define-key compose-grave-map [?`] [(?\140)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
208 (define-key compose-grave-map [A] [(?\300)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
209 (define-key compose-grave-map [E] [(?\310)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
210 (define-key compose-grave-map [I] [(?\314)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
211 (define-key compose-grave-map [O] [(?\322)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
212 (define-key compose-grave-map [U] [(?\331)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
213 (define-key compose-grave-map [a] [(?\340)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
214 (define-key compose-grave-map [e] [(?\350)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
215 (define-key compose-grave-map [i] [(?\354)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
216 (define-key compose-grave-map [o] [(?\362)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
217 (define-key compose-grave-map [u] [(?\371)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 (define-key compose-cedilla-map [space] ",")
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
220 (define-key compose-cedilla-map [?,] [(?\270)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
221 (define-key compose-cedilla-map [C] [(?\307)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
222 (define-key compose-cedilla-map [c] [(?\347)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
224 (define-key compose-diaeresis-map [space] [(?\250)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
225 (define-key compose-diaeresis-map [?\"] [(?\250)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
226 (define-key compose-diaeresis-map [A] [(?\304)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
227 (define-key compose-diaeresis-map [E] [(?\313)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
228 (define-key compose-diaeresis-map [I] [(?\317)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
229 (define-key compose-diaeresis-map [O] [(?\326)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
230 (define-key compose-diaeresis-map [U] [(?\334)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
231 (define-key compose-diaeresis-map [a] [(?\344)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
232 (define-key compose-diaeresis-map [e] [(?\353)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
233 (define-key compose-diaeresis-map [i] [(?\357)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
234 (define-key compose-diaeresis-map [o] [(?\366)])
3459
8f07ad760f0f [xemacs-hg @ 2006-06-18 21:43:38 by aidan]
aidan
parents: 2828
diff changeset
235 ;; Not strictly a diaeresis, but close enough for government work.
8f07ad760f0f [xemacs-hg @ 2006-06-18 21:43:38 by aidan]
aidan
parents: 2828
diff changeset
236 (define-key compose-diaeresis-map [s] [(?\337)])
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
237 (define-key compose-diaeresis-map [u] [(?\374)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
238 (define-key compose-diaeresis-map [y] [(?\377)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 (define-key compose-circumflex-map [space] "^")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 (define-key compose-circumflex-map [?/] "|")
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
242 (define-key compose-circumflex-map [?!] [(?\246)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
243 (define-key compose-circumflex-map [?-] [(?\257)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
244 (define-key compose-circumflex-map [?_] [(?\257)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
245 (define-key compose-circumflex-map [?0] [(?\260)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
246 (define-key compose-circumflex-map [?1] [(?\271)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
247 (define-key compose-circumflex-map [?2] [(?\262)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
248 (define-key compose-circumflex-map [?3] [(?\263)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
249 (define-key compose-circumflex-map [?.] [(?\267)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
250 (define-key compose-circumflex-map [A] [(?\302)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
251 (define-key compose-circumflex-map [E] [(?\312)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
252 (define-key compose-circumflex-map [I] [(?\316)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
253 (define-key compose-circumflex-map [O] [(?\324)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
254 (define-key compose-circumflex-map [U] [(?\333)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
255 (define-key compose-circumflex-map [a] [(?\342)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
256 (define-key compose-circumflex-map [e] [(?\352)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
257 (define-key compose-circumflex-map [i] [(?\356)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
258 (define-key compose-circumflex-map [o] [(?\364)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
259 (define-key compose-circumflex-map [u] [(?\373)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 (define-key compose-tilde-map [space] "~")
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
262 (define-key compose-tilde-map [A] [(?\303)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
263 (define-key compose-tilde-map [N] [(?\321)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
264 (define-key compose-tilde-map [O] [(?\325)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
265 (define-key compose-tilde-map [a] [(?\343)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
266 (define-key compose-tilde-map [n] [(?\361)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
267 (define-key compose-tilde-map [o] [(?\365)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
269 (define-key compose-ring-map [space] [(?\260)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
270 (define-key compose-ring-map [A] [(?\305)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
271 (define-key compose-ring-map [a] [(?\345)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 ;;; The rest of the compose-map. These are the composed characters
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 ;;; that are not accessible via "dead" keys.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 (define-key compose-map " '" "'")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 (define-key compose-map " ^" "^")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 (define-key compose-map " `" "`")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 (define-key compose-map " ~" "~")
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
281 (define-key compose-map " " [(?\240)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
282 (define-key compose-map " \"" [(?\250)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
283 (define-key compose-map " :" [(?\250)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
284 (define-key compose-map " *" [(?\260)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
286 (define-key compose-map "!!" [(?\241)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
287 (define-key compose-map "!^" [(?\246)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
288 (define-key compose-map "!S" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
289 (define-key compose-map "!s" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
290 (define-key compose-map "!P" [(?\266)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
291 (define-key compose-map "!p" [(?\266)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 (define-key compose-map "((" "[")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 (define-key compose-map "(-" "{")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 (define-key compose-map "))" "]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 (define-key compose-map ")-" "}")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 (define-key compose-map "++" "#")
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
300 (define-key compose-map "+-" [(?\261)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 (define-key compose-map "-(" "{")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 (define-key compose-map "-)" "}")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 (define-key compose-map "--" "-")
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
305 (define-key compose-map "-L" [(?\243)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
306 (define-key compose-map "-l" [(?\243)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
307 (define-key compose-map "-Y" [(?\245)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
308 (define-key compose-map "-y" [(?\245)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
309 (define-key compose-map "-," [(?\254)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
310 (define-key compose-map "-|" [(?\254)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
311 (define-key compose-map "-^" [(?\257)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
312 (define-key compose-map "-+" [(?\261)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
313 (define-key compose-map "-:" [(?\367)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
314 (define-key compose-map "-D" [(?\320)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
315 (define-key compose-map "-d" [(?\360)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
316 (define-key compose-map "-a" [(?\252)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
318 (define-key compose-map ".^" [(?\267)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 (define-key compose-map "//" "\\")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 (define-key compose-map "/<" "\\")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 (define-key compose-map "/^" "|")
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
323 (define-key compose-map "/C" [(?\242)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
324 (define-key compose-map "/c" [(?\242)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
325 (define-key compose-map "/U" [(?\265)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
326 (define-key compose-map "/u" [(?\265)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
327 (define-key compose-map "/O" [(?\330)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
328 (define-key compose-map "/o" [(?\370)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
330 (define-key compose-map "0X" [(?\244)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
331 (define-key compose-map "0x" [(?\244)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
332 (define-key compose-map "0S" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
333 (define-key compose-map "0s" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
334 (define-key compose-map "0C" [(?\251)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
335 (define-key compose-map "0c" [(?\251)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
336 (define-key compose-map "0R" [(?\256)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
337 (define-key compose-map "0r" [(?\256)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
338 (define-key compose-map "0^" [(?\260)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
340 (define-key compose-map "1^" [(?\271)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
341 (define-key compose-map "14" [(?\274)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
342 (define-key compose-map "12" [(?\275)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
344 (define-key compose-map "2^" [(?\262)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
346 (define-key compose-map "3^" [(?\263)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
347 (define-key compose-map "34" [(?\276)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
349 (define-key compose-map ":-" [(?\367)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 (define-key compose-map "</" "\\")
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
352 (define-key compose-map "<<" [(?\253)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
354 (define-key compose-map "=L" [(?\243)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
355 (define-key compose-map "=l" [(?\243)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
356 (define-key compose-map "=Y" [(?\245)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
357 (define-key compose-map "=y" [(?\245)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
358
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
359 (define-key compose-map ">>" [(?\273)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
361 (define-key compose-map "??" [(?\277)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
362
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 (define-key compose-map "AA" "@")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364 (define-key compose-map "Aa" "@")
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
365 (define-key compose-map "A_" [(?\252)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
366 (define-key compose-map "A`" [(?\300)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
367 (define-key compose-map "A'" [(?\301)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
368 (define-key compose-map "A^" [(?\302)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
369 (define-key compose-map "A~" [(?\303)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
370 (define-key compose-map "A\"" [(?\304)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
371 (define-key compose-map "A*" [(?\305)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
372 (define-key compose-map "AE" [(?\306)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
373
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
374 (define-key compose-map "C/" [(?\242)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
375 (define-key compose-map "C|" [(?\242)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
376 (define-key compose-map "C0" [(?\251)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
377 (define-key compose-map "CO" [(?\251)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
378 (define-key compose-map "Co" [(?\251)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
379 (define-key compose-map "C," [(?\307)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
380
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
381 (define-key compose-map "D-" [(?\320)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
382
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
383 (define-key compose-map "E`" [(?\310)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
384 (define-key compose-map "E'" [(?\311)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
385 (define-key compose-map "E^" [(?\312)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
386 (define-key compose-map "E\"" [(?\313)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
388 (define-key compose-map "I`" [(?\314)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
389 (define-key compose-map "I'" [(?\315)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
390 (define-key compose-map "I^" [(?\316)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
391 (define-key compose-map "I\"" [(?\317)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
392
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
393 (define-key compose-map "L-" [(?\243)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
394 (define-key compose-map "L=" [(?\243)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
395
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
396 (define-key compose-map "N~" [(?\321)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
397
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
398 (define-key compose-map "OX" [(?\244)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
399 (define-key compose-map "Ox" [(?\244)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
400 (define-key compose-map "OS" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
401 (define-key compose-map "Os" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
402 (define-key compose-map "OC" [(?\251)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
403 (define-key compose-map "Oc" [(?\251)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
404 (define-key compose-map "OR" [(?\256)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
405 (define-key compose-map "Or" [(?\256)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
406 (define-key compose-map "O_" [(?\272)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
407 (define-key compose-map "O`" [(?\322)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
408 (define-key compose-map "O'" [(?\323)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
409 (define-key compose-map "O^" [(?\324)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
410 (define-key compose-map "O~" [(?\325)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
411 (define-key compose-map "O\"" [(?\326)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
412 (define-key compose-map "O/" [(?\330)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
413
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
414 (define-key compose-map "P!" [(?\266)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
415
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
416 (define-key compose-map "R0" [(?\256)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
417 (define-key compose-map "RO" [(?\256)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
418 (define-key compose-map "Ro" [(?\256)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
419
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
420 (define-key compose-map "S!" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
421 (define-key compose-map "S0" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
422 (define-key compose-map "SO" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
423 (define-key compose-map "So" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
424 (define-key compose-map "SS" [(?\337)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
425
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
426 (define-key compose-map "TH" [(?\336)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
427
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
428 (define-key compose-map "U`" [(?\331)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
429 (define-key compose-map "U'" [(?\332)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
430 (define-key compose-map "U^" [(?\333)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
431 (define-key compose-map "U\"" [(?\334)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
432
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
433 (define-key compose-map "X0" [(?\244)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
434 (define-key compose-map "XO" [(?\244)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
435 (define-key compose-map "Xo" [(?\244)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
436
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
437 (define-key compose-map "Y-" [(?\245)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
438 (define-key compose-map "Y=" [(?\245)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
439 (define-key compose-map "Y'" [(?\335)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
440
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
441 (define-key compose-map "_A" [(?\252)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
442 (define-key compose-map "_a" [(?\252)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
443 (define-key compose-map "_^" [(?\257)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
444 (define-key compose-map "_O" [(?\272)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
445 (define-key compose-map "_o" [(?\272)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
446
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
447 (define-key compose-map "aA" "@")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
448 (define-key compose-map "aa" "@")
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
449 (define-key compose-map "a_" [(?\252)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
450 (define-key compose-map "a-" [(?\252)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
451 (define-key compose-map "a`" [(?\340)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
452 (define-key compose-map "a'" [(?\341)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
453 (define-key compose-map "a^" [(?\342)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
454 (define-key compose-map "a~" [(?\343)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
455 (define-key compose-map "a\"" [(?\344)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
456 (define-key compose-map "a*" [(?\345)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
457 (define-key compose-map "ae" [(?\346)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
458
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
459 (define-key compose-map "c/" [(?\242)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
460 (define-key compose-map "c|" [(?\242)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
461 (define-key compose-map "c0" [(?\251)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
462 (define-key compose-map "cO" [(?\251)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
463 (define-key compose-map "co" [(?\251)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
464 (define-key compose-map "c," [(?\347)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
465
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
466 (define-key compose-map "d-" [(?\360)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
467
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
468 (define-key compose-map "e`" [(?\350)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
469 (define-key compose-map "e'" [(?\351)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
470 (define-key compose-map "e^" [(?\352)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
471 (define-key compose-map "e\"" [(?\353)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
472
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
473 (define-key compose-map "i`" [(?\354)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
474 (define-key compose-map "i'" [(?\355)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
475 (define-key compose-map "i^" [(?\356)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
476 (define-key compose-map "i\"" [(?\357)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
477 (define-key compose-map "i:" [(?\357)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
478
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
479 (define-key compose-map "l-" [(?\243)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
480 (define-key compose-map "l=" [(?\243)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
481
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
482 (define-key compose-map "n~" [(?\361)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
483
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
484 (define-key compose-map "oX" [(?\244)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
485 (define-key compose-map "ox" [(?\244)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
486 (define-key compose-map "oC" [(?\251)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
487 (define-key compose-map "oc" [(?\251)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
488 (define-key compose-map "oR" [(?\256)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
489 (define-key compose-map "or" [(?\256)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
490 (define-key compose-map "oS" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
491 (define-key compose-map "os" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
492 (define-key compose-map "o_" [(?\272)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
493 (define-key compose-map "o`" [(?\362)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
494 (define-key compose-map "o'" [(?\363)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
495 (define-key compose-map "o^" [(?\364)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
496 (define-key compose-map "o~" [(?\365)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
497 (define-key compose-map "o\"" [(?\366)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
498 (define-key compose-map "o/" [(?\370)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
499
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
500 (define-key compose-map "p!" [(?\266)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
501
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
502 (define-key compose-map "r0" [(?\256)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
503 (define-key compose-map "rO" [(?\256)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
504 (define-key compose-map "ro" [(?\256)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
505
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
506 (define-key compose-map "s!" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
507 (define-key compose-map "s0" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
508 (define-key compose-map "sO" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
509 (define-key compose-map "so" [(?\247)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
510 (define-key compose-map "ss" [(?\337)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
511
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
512 (define-key compose-map "th" [(?\376)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
513
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
514 (define-key compose-map "u`" [(?\371)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
515 (define-key compose-map "u'" [(?\372)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
516 (define-key compose-map "u^" [(?\373)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
517 (define-key compose-map "u\"" [(?\374)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
518 (define-key compose-map "u/" [(?\265)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
519
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
520 (define-key compose-map "x0" [(?\244)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
521 (define-key compose-map "xO" [(?\244)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
522 (define-key compose-map "xo" [(?\244)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
523 (define-key compose-map "xx" [(?\327)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
524
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
525 (define-key compose-map "y-" [(?\245)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
526 (define-key compose-map "y=" [(?\245)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
527 (define-key compose-map "y'" [(?\375)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
528 (define-key compose-map "y\"" [(?\377)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
529
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
530 (define-key compose-map "|C" [(?\242)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
531 (define-key compose-map "|c" [(?\242)])
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
532 (define-key compose-map "||" [(?\246)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
533
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
534
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
535 ;; [[ Suppose we type these three physical keys: [Multi_key " a]
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
536 ;; Xlib can deliver these keys as the following sequences of keysyms:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
537 ;;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
538 ;; - [Multi_key " a] (no surprise here)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
539 ;; - [adiaeresis] (OK, Xlib is doing compose processing for us)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
540 ;; - [Multi_key " adiaeresis] (Huh?)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
541 ;;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
542 ;; It is the last possibility that is arguably a bug. Xlib can't
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
543 ;; decide whether it's really doing compose processing or not (or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
544 ;; actually, different parts of Xlib disagree).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
545 ;;
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
546 ;; So we'll just convert [Multi_key " adiaeresis] to [adiaeresis] ]]
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
547
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
548 (eval-when-compile
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
549 (when nil ;; Commenting out.
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
550
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
551 ;; This _used_ to work with our X11-oriented keysyms above. With them
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
552 ;; gone, it won't. The X11 bug it works around should be long dead. (Ha!
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
553 ;; Wasn't it cockroaches that would have ruled the planet after World
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
554 ;; War III?)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
555
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
556 (defun xlib-input-method-bug-workaround (keymap)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
557 (map-keymap
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
558 (lambda (key value)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
559 (cond
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
560 ((keymapp value)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
561 (xlib-input-method-bug-workaround value))
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
562 ((and (sequencep value)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
563 (eq 1 (length value))
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
564 (null (lookup-key keymap value)))
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
565 (define-key keymap value value))))
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
566 keymap))
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
567 (xlib-input-method-bug-workaround compose-map)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
568 (unintern 'xlib-input-method-bug-workaround)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
569
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
570 ;; While we're at it, a similar mechanism will make colon equivalent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
571 ;; to doublequote for diaeresis processing. Some Xlibs do this.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
572 (defun alias-colon-to-doublequote (keymap)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
573 (map-keymap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
574 (lambda (key value)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
575 (when (keymapp value)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
576 (alias-colon-to-doublequote value))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
577 (when (eq key '\")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
578 (define-key keymap ":" value)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
579 keymap))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
580 (alias-colon-to-doublequote compose-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
581 (unintern 'alias-colon-to-doublequote)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
582
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
583 ;;; Electric dead keys: making a' mean a-acute.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
584
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
585
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
586 (defun electric-diacritic (&optional count)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
587 "Modify the previous character with an accent.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
588 For example, if `:' is bound to this command, then typing `a:'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
589 will first insert `a' and then turn it into `\344' (adiaeresis).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
590 The keys to which this command may be bound (and the accents
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
591 which it understands) are:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
592
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
593 ' (acute) \301\311\315\323\332\335 \341\351\355\363\372\375
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
594 ` (grave) \300\310\314\322\331 \340\350\354\362\371
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
595 : (diaeresis) \304\313\317\326\334 \344\353\357\366\374\377
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
596 ^ (circumflex) \302\312\316\324\333 \342\352\356\364\373
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
597 , (cedilla) \307\347
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
598 . (ring) \305\345"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
599 (interactive "p")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
600 (or count (setq count 1))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
601
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
602 (if (not (eq last-command 'self-insert-command))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
603 ;; Only do the magic if the two chars were typed in succession.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
604 (self-insert-command count)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
605
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
606 ;; This is so that ``a : C-x u'' will transform `adiaeresis' back into `a:'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
607 (self-insert-command count)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
608 (undo-boundary)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
609 (delete-char (- count))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
610
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
611 (let* ((c last-command-char)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
612 (map (cond ((eq c ?') compose-acute-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
613 ((eq c ?`) compose-grave-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
614 ((eq c ?,) compose-cedilla-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
615 ((eq c ?:) compose-diaeresis-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
616 ((eq c ?^) compose-circumflex-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
617 ((eq c ?~) compose-tilde-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
618 ((eq c ?.) compose-ring-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
619 (t (error "unknown diacritic: %s (%c)" c c))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
620 (base-char (preceding-char))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
621 (mod-char (and (>= (downcase base-char) ?a) ; only do alphabetics?
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
622 (<= (downcase base-char) ?z)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
623 (lookup-key map (make-string 1 base-char)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
624 (if (and (vectorp mod-char) (= (length mod-char) 1))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
625 (setq mod-char (aref mod-char 0)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
626 (if (and mod-char (symbolp mod-char))
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
627 (setq mod-char (or (get mod-char 'character-of-keysym) mod-char)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
628 (if (and mod-char (> count 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
629 (delete-char -1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
630 (setq mod-char c))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
631 (while (> count 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
632 (insert mod-char)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
633 (setq count (1- count))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
634
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
635 ;; should "::" mean "¨" and ": " mean ":"?
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
636 ;; should we also do
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
637 ;; (?~
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
638 ;; (?A "\303")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
639 ;; (?C "\307")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
640 ;; (?D "\320")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
641 ;; (?N "\321")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
642 ;; (?O "\325")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
643 ;; (?a "\343")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
644 ;; (?c "\347")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
645 ;; (?d "\360")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
646 ;; (?n "\361")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
647 ;; (?o "\365")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
648 ;; (?> "\273")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
649 ;; (?< "\253")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
650 ;; (? "~")) ; no special code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
651 ;; (?\/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
652 ;; (?A "\305") ;; A-with-ring (Norwegian and Danish)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
653 ;; (?E "\306") ;; AE-ligature (Norwegian and Danish)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
654 ;; (?O "\330")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
655 ;; (?a "\345") ;; a-with-ring (Norwegian and Danish)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
656 ;; (?e "\346") ;; ae-ligature (Norwegian and Danish)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
657 ;; (?o "\370")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
658 ;; (? "/")) ; no special code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
659
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
660
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
661 ;;; Providing help in the middle of a compose sequence. (Way cool.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
662
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
663 (eval-when-compile
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
664 (defsubst next-composable-event ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
665 (let (event)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
666 (while (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
667 (setq event (next-command-event))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
668 (not (or (key-press-event-p event)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
669 (button-press-event-p event))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
670 (dispatch-event event))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
671 event)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
672
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
673 (defun compose-help (ignore-prompt)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
674 (let* ((keys (apply 'vector (nbutlast (append (this-command-keys) nil))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
675 (map (or (lookup-key function-key-map keys)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
676 (error "can't find map? %s %s" keys (this-command-keys))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
677 binding)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
678 (save-excursion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
679 (with-output-to-temp-buffer "*Help*"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
680 (set-buffer "*Help*")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
681 (erase-buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
682 (message "Working...")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
683 (setq ctl-arrow 'compose) ; non-t-non-nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
684 (insert "You are typing a compose sequence. So far you have typed: ")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
685 (insert (key-description keys))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
686 (insert "\nCompletions from here are:\n\n")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
687 (map-keymap 'compose-help-mapper map t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
688 (message "? ")))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
689 (while (keymapp map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
690 (setq binding (lookup-key map (vector (next-composable-event))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
691 (if (null binding)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
692 (message "No such key in keymap. Try again.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
693 (setq map binding)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
694 binding))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
695
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
696 (put 'compose-help 'isearch-command t) ; so that it doesn't terminate isearch
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
697
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
698 (defun compose-help-mapper (key binding)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
699 (if (and (symbolp key)
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
700 (get key 'character-of-keysym))
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
701 (setq key (get key 'character-of-keysym)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
702 (if (eq binding 'compose-help) ; suppress that...
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
703 nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
704 (if (keymapp binding)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
705 (let ((p (point)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
706 (map-keymap 'compose-help-mapper binding t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
707 (goto-char p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
708 (while (not (eobp))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
709 (if (characterp key)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
710 (insert (make-string 1 key))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
711 (insert (single-key-description key)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
712 (insert " ")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
713 (forward-line 1)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
714 (if (characterp key)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
715 (insert (make-string 1 key))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
716 (insert (single-key-description key)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
717 (indent-to 16)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
718 (let ((code (and (vectorp binding)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
719 (= 1 (length binding))
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 428
diff changeset
720 (get (aref binding 0) 'character-of-keysym))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
721 (if code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
722 (insert (make-string 1 code))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
723 (if (stringp binding)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
724 (insert binding)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
725 (insert (prin1-to-string binding)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
726 (when (and (vectorp binding) (= 1 (length binding)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
727 (indent-to 32)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
728 (insert (symbol-name (aref binding 0)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
729 (insert "\n")))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
730
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
731 ;; define it at top-level in the compose map...
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
732 ;;(define-key compose-map [(control h)] 'compose-help)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
733 ;;(define-key compose-map [help] 'compose-help)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
734 ;; and then define it in each sub-map of the compose map.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
735 (map-keymap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
736 (lambda (key binding)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
737 (when (keymapp binding)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
738 ;; (define-key binding [(control h)] 'compose-help)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
739 ;; (define-key binding [help] 'compose-help)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
740 ))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
741 compose-map nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
742
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
743 ;; Make redisplay display the accented letters
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
744 (if (memq (default-value 'ctl-arrow) '(t nil))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
745 (setq-default ctl-arrow 'iso-8859/1))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
746
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
747
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
748 (provide 'x-compose)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
749
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
750 ;;; x-compose.el ends here