annotate lisp/x-compose.el @ 278:90d73dddcdc4 r21-0b37

Import from CVS: tag r21-0b37
author cvs
date Mon, 13 Aug 2007 10:31:29 +0200
parents 41f2f0e326e9
children 8626e4521993
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
1 ;;; x-compose.el --- Compose-key processing in XEmacs
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
2
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
3 ;; Copyright (C) 1992, 1993, 1997 Free Software Foundation, Inc.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
4
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
5 ;; Author: Jamie Zawinski <jwz@netscape.com>
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
6 ;; Maintainer: XEmacs Development Team
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
7 ;; Rewritten by Martin Buchholz far too many times.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
8 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
9 ;; Changed: 11 Jun 1997 by Heiko Muenkel <muenkel@tnt.uni-hannover.de>
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
10 ;; The degree sign couldn't be inserted with the old version.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
11 ;; Keywords: i18n
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
12
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
13 ;; This file is part of XEmacs.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
14
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
15 ;; XEmacs is free software; you can redistribute it and/or modify it
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
16 ;; under the terms of the GNU General Public License as published by
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
17 ;; the Free Software Foundation; either version 2, or (at your option)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
18 ;; any later version.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
19
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
20 ;; XEmacs is distributed in the hope that it will be useful, but
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
21 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
22 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
23 ;; General Public License for more details.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
24
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
25 ;; You should have received a copy of the GNU General Public License
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
26 ;; along with XEmacs; see the file COPYING. If not, write to the
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
27 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
28 ;; Boston, MA 02111-1307, USA.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
29
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
30 ;;; Synched up with: Not in FSF.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
31
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
32 ;;; Commentary:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
33
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
34 ;; created by jwz, 14-jun-92.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
35 ;;; changed by Jan Vroonhof, July 1997: Use function-key-map instead
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
36 ;;; of global map.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
37 ;;; Preliminary support for
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
38 ;;; XFree86 deadkeys
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
39
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
40 ;; This file implements DEC-, OpenWindows-, and HP-compatible "Compose"
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
41 ;; processing for XEmacs.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
42
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
43 ;; If you are running a version of X which already does compose processing,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
44 ;; then you don't need this file. But the MIT R4 and R5 distributions don't
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
45 ;; do compose processing, so you may want to fake it by using this code.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
46
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
47 ;; The basic idea is that there are several ways to generate keysyms which
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
48 ;; do not have keys devoted to them on your keyboard.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
49
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
50 ;; The first method is by using "dead" keys. A dead key is a key which,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
51 ;; when typed, does not insert a character. Instead it modifies the
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
52 ;; following character typed. So if you typed "dead-tilde" followed by "A",
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
53 ;; then "A-tilde" would be inserted. Of course, this requires you to modify
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
54 ;; your keyboard to include a "dead-tilde" key on it somewhere.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
55
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
56 ;; The second method is by using a "Compose" key. With a Compose key, you
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
57 ;; would type "Compose" then "tilde" then "A" to insert "A-tilde".
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
58
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
59 ;; There are a small number of dead keys: acute, grave, cedilla, diaeresis,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
60 ;; circumflex, tilde, and ring. There are a larger number of accented and
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
61 ;; other characters accessible via the Compose key, so both are useful.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
62
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
63 ;; To use this code, you will need to have a Compose key on your keyboard.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
64 ;; The default configuration of most X keyboards doesn't contain one. You
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
65 ;; can, for example, turn the right "Meta" key into a "Compose" key with
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
66 ;; this command:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
67
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
68 ;; xmodmap -e "remove mod1 = Meta_R" -e "keysym Meta_R = Multi_key"
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
69
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
70 ;; Multi-key is the name that X (and emacs) know the "Compose" key by.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
71 ;; The "remove..." command is necessary because the "Compose" key must not
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
72 ;; have any modifier bits associated with it. This exact command may not
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
73 ;; work, depending on what system and keyboard you are using. If it
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
74 ;; doesn't, you'll have to read the man page for xmodmap. You might want
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 209
diff changeset
75 ;; to get the "xkeycaps" program from
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 209
diff changeset
76 ;; <URL:http://people.netscape.com/jwz/xkeycaps/>,
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 209
diff changeset
77 ;; which is a graphical front end to xmodmap
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
78 ;; that hides xmodmap's arcane syntax from you.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
79
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
80 ;; If for some reason you don't want to have a dedicated compose key on your
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
81 ;; keyboard, you can use some other key as the prefix. For example, to make
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
82 ;; "Meta-Shift-C" act as a compose key (so that "M-C , c" would insert the
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
83 ;; character "ccedilla") you could do
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
84
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
85 ;; (global-set-key "\M-C" compose-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
86
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
87 ;; I believe the bindings encoded in this file are the same as those used
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
88 ;; by OpenWindows versions 2 and 3, and DEC VT320 terminals. Please let me
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
89 ;; know if you think otherwise.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
90
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
91 ;; Much thanks to Justin Bur <justin@crim.ca> for helping me understand how
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
92 ;; this stuff is supposed to work.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
93
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
94 ;; You also might want to consider getting Justin's patch for the MIT Xlib
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
95 ;; that implements compose processing in the library. This will enable
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
96 ;; compose processing in applications other than emacs as well. You can
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
97 ;; get it from export.lcs.mit.edu in contrib/compose.tar.Z.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
98
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
99 ;; This code has one feature that a more "builtin" Compose mechanism could
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
100 ;; not have: at any point you can type C-h to get a list of the possible
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
101 ;; completions of what you have typed so far.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
102
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
103 ;;; Code:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
104
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
105 (require 'x-iso8859-1)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
106
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
107 (defun make-compose-map (map-sym)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
108 (let ((map (make-sparse-keymap)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
109 (set map-sym map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
110 (set-keymap-name map map-sym)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
111 ;; Required to tell XEmacs the keymaps were actually autoloaded.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
112 ;; #### Make this unnecessary!
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
113 (fset map-sym map)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
114
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
115 (make-compose-map 'compose-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
116 (make-compose-map 'compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
117 (make-compose-map 'compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
118 (make-compose-map 'compose-cedilla-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
119 (make-compose-map 'compose-diaeresis-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
120 (make-compose-map 'compose-circumflex-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
121 (make-compose-map 'compose-tilde-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
122 (make-compose-map 'compose-ring-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
123
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
124 (unintern 'make-compose-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
125
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
126 (define-key compose-map 'acute compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
127 (define-key compose-map 'grave compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
128 (define-key compose-map 'cedilla compose-cedilla-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
129 (define-key compose-map 'diaeresis compose-diaeresis-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
130 (define-key compose-map 'circumflex compose-circumflex-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
131 (define-key compose-map 'tilde compose-tilde-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
132 (define-key compose-map 'degree compose-ring-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
133
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
134 ;;(eval-when-compile
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
135 ;; (defsubst define-dead-key-map (key map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
136 ;; (define-key function-key-map key map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
137 ;; (define-key compose-map key map)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
138
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
139 ;;;###utoload (autoload 'compose-map "x-compose" nil t 'keymap)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
140 ;;;###utoload (autoload 'compose-acute-map "x-compose" nil t 'keymap)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
141 ;;;###utoload (autoload 'compose-grave-map "x-compose" nil t 'keymap)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
142 ;;;###utoload (autoload 'compose-cedilla-map "x-compose" nil t 'keymap)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
143 ;;;###utoload (autoload 'compose-diaeresis-map "x-compose" nil t 'keymap)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
144 ;;;###utoload (autoload 'compose-degree-map "x-compose" nil t 'keymap)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
145 ;;;###utoload (define-key function-key-map [acute] 'compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
146 ;;;###utoload (define-key function-key-map [grave] 'compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
147 ;;;###utoload (define-key function-key-map [cedilla] 'compose-cedilla-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
148 ;;;###utoload (define-key function-key-map [diaeresis] 'compose-diaeresis-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
149 ;;;###utoload (define-key function-key-map [degree] 'compose-degree-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
150 ;;;###utoload (define-key function-key-map [multi-key] 'compose-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
151 ;;;###utoload (define-key global-map [multi-key] 'compose-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
152
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
153 ;;(define-key function-key-map [multi-key] compose-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
154
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
155
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
156 ;; The following is necessary, because one can't rebind [degree]
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
157 ;; and use it to insert the degree sign!
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
158 ;;(defun compose-insert-degree ()
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
159 ;; "Inserts a degree sign."
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
160 ;; (interactive)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
161 ;; (insert ?\260))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
162
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
163 ;; The "Dead" keys:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
164 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
165 ;;(define-dead-key-map [acute] compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
166 ;;(define-dead-key-map [cedilla] compose-cedilla-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
167 ;;(define-dead-key-map [diaeresis] compose-diaeresis-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
168 ;;(define-dead-key-map [degree] compose-ring-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
169
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
170 (define-key compose-map [acute] compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
171 (define-key compose-map [?'] compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
172 (define-key compose-map [grave] compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
173 (define-key compose-map [?`] compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
174 (define-key compose-map [cedilla] compose-cedilla-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
175 (define-key compose-map [?,] compose-cedilla-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
176 (define-key compose-map [diaeresis] compose-diaeresis-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
177 (define-key compose-map [?\"] compose-diaeresis-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
178 (define-key compose-map [circumflex] compose-circumflex-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
179 (define-key compose-map [?^] compose-circumflex-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
180 (define-key compose-map [tilde] compose-tilde-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
181 (define-key compose-map [~] compose-tilde-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
182 (define-key compose-map [degree] compose-ring-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
183 (define-key compose-map [?*] compose-ring-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
184
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
185
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
186 ;;; The dead keys might really be called just about anything, depending
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
187 ;;; on the vendor. MIT thinks that the prefixes are "SunFA_", "D", and
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
188 ;;; "hpmute_" for Sun, DEC, and HP respectively. However, OpenWindows 3
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
189 ;;; thinks that the prefixes are "SunXK_FA_", "DXK_", and "hpXK_mute_".
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
190 ;;; And HP (who don't mention Sun and DEC at all) use "XK_mute_".
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
191 ;;; Go figure.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
192
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
193 ;;; Presumably if someone is running OpenWindows, they won't be using
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
194 ;;; the DEC or HP keysyms, but if they are defined then that is possible,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
195 ;;; so in that case we accept them all.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
196
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
197 ;;; If things seem not to be working, you might want to check your
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
198 ;;; /usr/lib/X11/XKeysymDB file to see if your vendor has an equally
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
199 ;;; mixed up view of what these keys should be called.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
200
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
201 ;; Sun according to MIT:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
202 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
203
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
204 ;;(when (x-valid-keysym-name-p "SunFA_Acute")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
205 ;; (define-dead-key-map [SunFA_Acute] compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
206 ;; (define-dead-key-map [SunFA_Grave] compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
207 ;; (define-dead-key-map [SunFA_Cedilla] compose-cedilla-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
208 ;; (define-dead-key-map [SunFA_Diaeresis] compose-diaeresis-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
209 ;; (define-dead-key-map [SunFA_Circum] compose-circumflex-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
210 ;; (define-dead-key-map [SunFA_Tilde] compose-tilde-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
211 ;; )
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
212 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
213 ;;;; Sun according to OpenWindows 2:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
214 ;;;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
215 ;;(when (x-valid-keysym-name-p "Dead_Grave")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
216 ;; (define-dead-key-map [Dead_Grave] compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
217 ;; (define-dead-key-map [Dead_Circum] compose-circumflex-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
218 ;; (define-dead-key-map [Dead_Tilde] compose-tilde-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
219 ;; )
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
220 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
221 ;;;; Sun according to OpenWindows 3:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
222 ;;;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
223 ;;(when (x-valid-keysym-name-p "SunXK_FA_Acute")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
224 ;; (define-dead-key-map [SunXK_FA_Acute] compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
225 ;; (define-dead-key-map [SunXK_FA_Grave] compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
226 ;; (define-dead-key-map [SunXK_FA_Cedilla] compose-cedilla-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
227 ;; (define-dead-key-map [SunXK_FA_Diaeresis] compose-diaeresis-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
228 ;; (define-dead-key-map [SunXK_FA_Circum] compose-circumflex-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
229 ;; (define-dead-key-map [SunXK_FA_Tilde] compose-tilde-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
230 ;; )
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
231 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
232 ;;;; DEC according to MIT:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
233 ;;;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
234 ;;(when (x-valid-keysym-name-p "Dacute_accent")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
235 ;; (define-dead-key-map [Dacute_accent] compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
236 ;; (define-dead-key-map [Dgrave_accent] compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
237 ;; (define-dead-key-map [Dcedilla_accent] compose-cedilla-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
238 ;; (define-dead-key-map [Dcircumflex_accent] compose-circumflex-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
239 ;; (define-dead-key-map [Dtilde] compose-tilde-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
240 ;; (define-dead-key-map [Dring_accent] compose-ring-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
241 ;; )
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
242 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
243 ;;;; DEC according to OpenWindows 3:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
244 ;;;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
245 ;;(when (x-valid-keysym-name-p "DXK_acute_accent")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
246 ;; (define-dead-key-map [DXK_acute_accent] compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
247 ;; (define-dead-key-map [DXK_grave_accent] compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
248 ;; (define-dead-key-map [DXK_cedilla_accent] compose-cedilla-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
249 ;; (define-dead-key-map [DXK_circumflex_accent] compose-circumflex-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
250 ;; (define-dead-key-map [DXK_tilde] compose-tilde-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
251 ;; (define-dead-key-map [DXK_ring_accent] compose-ring-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
252 ;; )
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
253 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
254 ;;;; HP according to MIT:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
255 ;;;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
256 ;;(when (x-valid-keysym-name-p "hpmute_acute")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
257 ;; (define-dead-key-map [hpmute_acute] compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
258 ;; (define-dead-key-map [hpmute_grave] compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
259 ;; (define-dead-key-map [hpmute_diaeresis] compose-diaeresis-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
260 ;; (define-dead-key-map [hpmute_asciicircum] compose-circumflex-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
261 ;; (define-dead-key-map [hpmute_asciitilde] compose-tilde-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
262 ;; )
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
263 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
264 ;;;; HP according to OpenWindows 3:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
265 ;;;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
266 ;;(when (x-valid-keysym-name-p "hpXK_mute_acute")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
267 ;; (define-dead-key-map [hpXK_mute_acute] compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
268 ;; (define-dead-key-map [hpXK_mute_grave] compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
269 ;; (define-dead-key-map [hpXK_mute_diaeresis] compose-diaeresis-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
270 ;; (define-dead-key-map [hpXK_mute_asciicircum] compose-circumflex-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
271 ;; (define-dead-key-map [hpXK_mute_asciitilde] compose-tilde-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
272 ;; )
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
273 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
274 ;;;; HP according to HP-UX 8.0:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
275 ;;;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
276 ;;(when (x-valid-keysym-name-p "XK_mute_acute")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
277 ;; (define-dead-key-map [XK_mute_acute] compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
278 ;; (define-dead-key-map [XK_mute_grave] compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
279 ;; (define-dead-key-map [XK_mute_diaeresis] compose-diaeresis-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
280 ;; (define-dead-key-map [XK_mute_asciicircum] compose-circumflex-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
281 ;; (define-dead-key-map [XK_mute_asciitilde] compose-tilde-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
282 ;; )
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
283 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
284 ;;;; Xfree seems to use lower case and a hyphen
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
285 ;;(when (x-valid-keysym-name-p "dead-tilde")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
286 ;; (define-dead-key-map [dead-acute] compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
287 ;; (define-dead-key-map [dead-grave] compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
288 ;; (define-dead-key-map [dead-cedilla] compose-cedilla-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
289 ;; (define-dead-key-map [dead-diaeresis] compose-diaeresis-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
290 ;; (define-dead-key-map [dead-circum] compose-circumflex-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
291 ;; (define-dead-key-map [dead-tilde] compose-tilde-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
292 ;; )
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
293
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
294
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
295
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
296 ;;; The contents of the "dead key" maps. These are shared by the
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
297 ;;; compose-map.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
298
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
299 (define-key compose-acute-map [space] "'")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
300 (define-key compose-acute-map [?'] [acute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
301 (define-key compose-acute-map [?A] [Aacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
302 (define-key compose-acute-map [E] [Eacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
303 (define-key compose-acute-map [I] [Iacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
304 (define-key compose-acute-map [O] [Oacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
305 (define-key compose-acute-map [U] [Uacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
306 (define-key compose-acute-map [Y] [Yacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
307 (define-key compose-acute-map [a] [aacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
308 (define-key compose-acute-map [e] [eacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
309 (define-key compose-acute-map [i] [iacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
310 (define-key compose-acute-map [o] [oacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
311 (define-key compose-acute-map [u] [uacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
312 (define-key compose-acute-map [y] [yacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
313
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
314 (define-key compose-grave-map [space] "`")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
315 (define-key compose-grave-map [?`] [grave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
316 (define-key compose-grave-map [A] [Agrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
317 (define-key compose-grave-map [E] [Egrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
318 (define-key compose-grave-map [I] [Igrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
319 (define-key compose-grave-map [O] [Ograve])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
320 (define-key compose-grave-map [U] [Ugrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
321 (define-key compose-grave-map [a] [agrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
322 (define-key compose-grave-map [e] [egrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
323 (define-key compose-grave-map [i] [igrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
324 (define-key compose-grave-map [o] [ograve])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
325 (define-key compose-grave-map [u] [ugrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
326
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
327 (define-key compose-cedilla-map [space] ",")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
328 (define-key compose-cedilla-map [?,] [cedilla])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
329 (define-key compose-cedilla-map [C] [Ccedilla])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
330 (define-key compose-cedilla-map [c] [ccedilla])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
331
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
332 (define-key compose-diaeresis-map [space] [diaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
333 (define-key compose-diaeresis-map [?\"] [diaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
334 (define-key compose-diaeresis-map [A] [Adiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
335 (define-key compose-diaeresis-map [E] [Ediaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
336 (define-key compose-diaeresis-map [I] [Idiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
337 (define-key compose-diaeresis-map [O] [Odiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
338 (define-key compose-diaeresis-map [U] [Udiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
339 (define-key compose-diaeresis-map [a] [adiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
340 (define-key compose-diaeresis-map [e] [ediaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
341 (define-key compose-diaeresis-map [i] [idiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
342 (define-key compose-diaeresis-map [o] [odiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
343 (define-key compose-diaeresis-map [u] [udiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
344 (define-key compose-diaeresis-map [y] [ydiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
345
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
346 (define-key compose-circumflex-map [space] "^")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
347 (define-key compose-circumflex-map [?/] "|")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
348 (define-key compose-circumflex-map [?!] [brokenbar])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
349 (define-key compose-circumflex-map [?-] [macron])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
350 (define-key compose-circumflex-map [?_] [macron])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
351 (define-key compose-circumflex-map [?0] [degree])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
352 (define-key compose-circumflex-map [?1] [onesuperior])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
353 (define-key compose-circumflex-map [?2] [twosuperior])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
354 (define-key compose-circumflex-map [?3] [threesuperior])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
355 (define-key compose-circumflex-map [?.] [periodcentered])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
356 (define-key compose-circumflex-map [A] [Acircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
357 (define-key compose-circumflex-map [E] [Ecircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
358 (define-key compose-circumflex-map [I] [Icircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
359 (define-key compose-circumflex-map [O] [Ocircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
360 (define-key compose-circumflex-map [U] [Ucircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
361 (define-key compose-circumflex-map [a] [acircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
362 (define-key compose-circumflex-map [e] [ecircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
363 (define-key compose-circumflex-map [i] [icircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
364 (define-key compose-circumflex-map [o] [ocircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
365 (define-key compose-circumflex-map [u] [ucircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
366
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
367 (define-key compose-tilde-map [space] "~")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
368 (define-key compose-tilde-map [A] [Atilde])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
369 (define-key compose-tilde-map [N] [Ntilde])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
370 (define-key compose-tilde-map [O] [Otilde])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
371 (define-key compose-tilde-map [a] [atilde])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
372 (define-key compose-tilde-map [n] [ntilde])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
373 (define-key compose-tilde-map [o] [otilde])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
374
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
375 (define-key compose-ring-map [space] [degree])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
376 (define-key compose-ring-map [A] [Aring])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
377 (define-key compose-ring-map [a] [aring])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
378
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
379
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
380 ;;; The rest of the compose-map. These are the composed characters
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
381 ;;; that are not accessible via "dead" keys.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
382
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
383 (define-key compose-map " '" "'")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
384 (define-key compose-map " ^" "^")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
385 (define-key compose-map " `" "`")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
386 (define-key compose-map " ~" "~")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
387 (define-key compose-map " " [nobreakspace])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
388 (define-key compose-map " \"" [diaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
389 (define-key compose-map " :" [diaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
390 (define-key compose-map " *" [degree])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
391
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
392 (define-key compose-map "!!" [exclamdown])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
393 (define-key compose-map "!^" [brokenbar])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
394 (define-key compose-map "!S" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
395 (define-key compose-map "!s" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
396 (define-key compose-map "!P" [paragraph])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
397 (define-key compose-map "!p" [paragraph])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
398
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
399 (define-key compose-map "((" "[")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
400 (define-key compose-map "(-" "{")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
401
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
402 (define-key compose-map "))" "]")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
403 (define-key compose-map ")-" "}")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
404
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
405 (define-key compose-map "++" "#")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
406 (define-key compose-map "+-" [plusminus])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
407
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
408 (define-key compose-map "-(" "{")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
409 (define-key compose-map "-)" "}")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
410 (define-key compose-map "--" "-")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
411 (define-key compose-map "-L" [sterling])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
412 (define-key compose-map "-l" [sterling])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
413 (define-key compose-map "-Y" [yen])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
414 (define-key compose-map "-y" [yen])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
415 (define-key compose-map "-," [notsign])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
416 (define-key compose-map "-|" [notsign])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
417 (define-key compose-map "-^" [macron])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
418 (define-key compose-map "-+" [plusminus])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
419 (define-key compose-map "-:" [division])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
420 (define-key compose-map "-D" [ETH])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
421 (define-key compose-map "-d" [eth])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
422 (define-key compose-map "-a" [ordfeminine])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
423
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
424 (define-key compose-map ".^" [periodcentered])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
425
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
426 (define-key compose-map "//" "\\")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
427 (define-key compose-map "/<" "\\")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
428 (define-key compose-map "/^" "|")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
429 (define-key compose-map "/C" [cent])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
430 (define-key compose-map "/c" [cent])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
431 (define-key compose-map "/U" [mu])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
432 (define-key compose-map "/u" [mu])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
433 (define-key compose-map "/O" [Ooblique])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
434 (define-key compose-map "/o" [oslash])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
435
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
436 (define-key compose-map "0X" [currency])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
437 (define-key compose-map "0x" [currency])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
438 (define-key compose-map "0S" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
439 (define-key compose-map "0s" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
440 (define-key compose-map "0C" [copyright])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
441 (define-key compose-map "0c" [copyright])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
442 (define-key compose-map "0R" [registered])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
443 (define-key compose-map "0r" [registered])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
444 (define-key compose-map "0^" [degree])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
445
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
446 (define-key compose-map "1^" [onesuperior])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
447 (define-key compose-map "14" [onequarter])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
448 (define-key compose-map "12" [onehalf])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
449
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
450 (define-key compose-map "2^" [twosuperior])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
451
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
452 (define-key compose-map "3^" [threesuperior])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
453 (define-key compose-map "34" [threequarters])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
454
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
455 (define-key compose-map ":-" [division])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
456
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
457 (define-key compose-map "</" "\\")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
458 (define-key compose-map "<<" [guillemotleft])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
459
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
460 (define-key compose-map "=L" [sterling])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
461 (define-key compose-map "=l" [sterling])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
462 (define-key compose-map "=Y" [yen])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
463 (define-key compose-map "=y" [yen])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
464
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
465 (define-key compose-map ">>" [guillemotright])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
466
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
467 (define-key compose-map "??" [questiondown])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
468
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
469 (define-key compose-map "AA" "@")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
470 (define-key compose-map "Aa" "@")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
471 (define-key compose-map "A_" [ordfeminine])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
472 (define-key compose-map "A`" [Agrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
473 (define-key compose-map "A'" [Aacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
474 (define-key compose-map "A^" [Acircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
475 (define-key compose-map "A~" [Atilde])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
476 (define-key compose-map "A\"" [Adiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
477 (define-key compose-map "A*" [Aring])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
478 (define-key compose-map "AE" [AE])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
479
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
480 (define-key compose-map "C/" [cent])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
481 (define-key compose-map "C|" [cent])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
482 (define-key compose-map "C0" [copyright])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
483 (define-key compose-map "CO" [copyright])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
484 (define-key compose-map "Co" [copyright])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
485 (define-key compose-map "C," [Ccedilla])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
486
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
487 (define-key compose-map "D-" [ETH])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
488
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
489 (define-key compose-map "E`" [Egrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
490 (define-key compose-map "E'" [Eacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
491 (define-key compose-map "E^" [Ecircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
492 (define-key compose-map "E\"" [Ediaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
493
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
494 (define-key compose-map "I`" [Igrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
495 (define-key compose-map "I'" [Iacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
496 (define-key compose-map "I^" [Icircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
497 (define-key compose-map "I\"" [Idiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
498
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
499 (define-key compose-map "L-" [sterling])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
500 (define-key compose-map "L=" [sterling])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
501
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
502 (define-key compose-map "N~" [Ntilde])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
503
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
504 (define-key compose-map "OX" [currency])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
505 (define-key compose-map "Ox" [currency])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
506 (define-key compose-map "OS" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
507 (define-key compose-map "Os" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
508 (define-key compose-map "OC" [copyright])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
509 (define-key compose-map "Oc" [copyright])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
510 (define-key compose-map "OR" [registered])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
511 (define-key compose-map "Or" [registered])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
512 (define-key compose-map "O_" [masculine])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
513 (define-key compose-map "O`" [Ograve])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
514 (define-key compose-map "O'" [Oacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
515 (define-key compose-map "O^" [Ocircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
516 (define-key compose-map "O~" [Otilde])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
517 (define-key compose-map "O\"" [Odiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
518 (define-key compose-map "O/" [Ooblique])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
519
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
520 (define-key compose-map "P!" [paragraph])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
521
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
522 (define-key compose-map "R0" [registered])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
523 (define-key compose-map "RO" [registered])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
524 (define-key compose-map "Ro" [registered])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
525
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
526 (define-key compose-map "S!" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
527 (define-key compose-map "S0" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
528 (define-key compose-map "SO" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
529 (define-key compose-map "So" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
530 (define-key compose-map "SS" [ssharp])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
531
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
532 (define-key compose-map "TH" [THORN])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
533
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
534 (define-key compose-map "U`" [Ugrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
535 (define-key compose-map "U'" [Uacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
536 (define-key compose-map "U^" [Ucircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
537 (define-key compose-map "U\"" [Udiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
538
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
539 (define-key compose-map "X0" [currency])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
540 (define-key compose-map "XO" [currency])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
541 (define-key compose-map "Xo" [currency])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
542
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
543 (define-key compose-map "Y-" [yen])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
544 (define-key compose-map "Y=" [yen])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
545 (define-key compose-map "Y'" [Yacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
546
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
547 (define-key compose-map "_A" [ordfeminine])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
548 (define-key compose-map "_a" [ordfeminine])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
549 (define-key compose-map "_^" [macron])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
550 (define-key compose-map "_O" [masculine])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
551 (define-key compose-map "_o" [masculine])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
552
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
553 (define-key compose-map "aA" "@")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
554 (define-key compose-map "aa" "@")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
555 (define-key compose-map "a_" [ordfeminine])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
556 (define-key compose-map "a-" [ordfeminine])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
557 (define-key compose-map "a`" [agrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
558 (define-key compose-map "a'" [aacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
559 (define-key compose-map "a^" [acircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
560 (define-key compose-map "a~" [atilde])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
561 (define-key compose-map "a\"" [adiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
562 (define-key compose-map "a*" [aring])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
563 (define-key compose-map "ae" [ae])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
564
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
565 (define-key compose-map "c/" [cent])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
566 (define-key compose-map "c|" [cent])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
567 (define-key compose-map "c0" [copyright])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
568 (define-key compose-map "cO" [copyright])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
569 (define-key compose-map "co" [copyright])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
570 (define-key compose-map "c," [ccedilla])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
571
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
572 (define-key compose-map "d-" [eth])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
573
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
574 (define-key compose-map "e`" [egrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
575 (define-key compose-map "e'" [eacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
576 (define-key compose-map "e^" [ecircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
577 (define-key compose-map "e\"" [ediaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
578
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
579 (define-key compose-map "i`" [igrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
580 (define-key compose-map "i'" [iacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
581 (define-key compose-map "i^" [icircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
582 (define-key compose-map "i\"" [idiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
583 (define-key compose-map "i:" [idiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
584
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
585 (define-key compose-map "l-" [sterling])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
586 (define-key compose-map "l=" [sterling])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
587
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
588 (define-key compose-map "n~" [ntilde])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
589
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
590 (define-key compose-map "oX" [currency])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
591 (define-key compose-map "ox" [currency])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
592 (define-key compose-map "oC" [copyright])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
593 (define-key compose-map "oc" [copyright])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
594 (define-key compose-map "oR" [registered])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
595 (define-key compose-map "or" [registered])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
596 (define-key compose-map "oS" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
597 (define-key compose-map "os" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
598 (define-key compose-map "o_" [masculine])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
599 (define-key compose-map "o`" [ograve])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
600 (define-key compose-map "o'" [oacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
601 (define-key compose-map "o^" [ocircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
602 (define-key compose-map "o~" [otilde])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
603 (define-key compose-map "o\"" [odiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
604 (define-key compose-map "o/" [oslash])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
605
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
606 (define-key compose-map "p!" [paragraph])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
607
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
608 (define-key compose-map "r0" [registered])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
609 (define-key compose-map "rO" [registered])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
610 (define-key compose-map "ro" [registered])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
611
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
612 (define-key compose-map "s!" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
613 (define-key compose-map "s0" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
614 (define-key compose-map "sO" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
615 (define-key compose-map "so" [section])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
616 (define-key compose-map "ss" [ssharp])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
617
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
618 (define-key compose-map "th" [thorn])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
619
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
620 (define-key compose-map "u`" [ugrave])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
621 (define-key compose-map "u'" [uacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
622 (define-key compose-map "u^" [ucircumflex])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
623 (define-key compose-map "u\"" [udiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
624 (define-key compose-map "u/" [mu])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
625
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
626 (define-key compose-map "x0" [currency])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
627 (define-key compose-map "xO" [currency])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
628 (define-key compose-map "xo" [currency])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
629 (define-key compose-map "xx" [multiply])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
630
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
631 (define-key compose-map "y-" [yen])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
632 (define-key compose-map "y=" [yen])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
633 (define-key compose-map "y'" [yacute])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
634 (define-key compose-map "y\"" [ydiaeresis])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
635
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
636 (define-key compose-map "|C" [cent])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
637 (define-key compose-map "|c" [cent])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
638 (define-key compose-map "||" [brokenbar])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
639
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
640
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
641 ;; Suppose we type these three physical keys: [Multi_key " a]
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
642 ;; Xlib can deliver these keys as the following sequences of keysyms:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
643 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
644 ;; - [Multi_key " a] (no surprise here)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
645 ;; - [adiaeresis] (OK, Xlib is doing compose processing for us)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
646 ;; - [Multi_key " adiaeresis] (Huh?)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
647 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
648 ;; It is the last possibility that is arguably a bug. Xlib can't
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
649 ;; decide whether it's really doing compose processing or not (or
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
650 ;; actually, different parts of Xlib disagree).
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
651 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
652 ;; So we'll just convert [Multi_key " adiaeresis] to [adiaeresis]
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
653 (defun xlib-input-method-bug-workaround (keymap)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
654 (map-keymap
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
655 (lambda (key value)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
656 (cond
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
657 ((keymapp value)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
658 (xlib-input-method-bug-workaround value))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
659 ((and (sequencep value)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
660 (eq 1 (length value))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
661 (null (lookup-key keymap value)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
662 (define-key keymap value value))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
663 keymap))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
664 (xlib-input-method-bug-workaround compose-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
665 (unintern 'xlib-input-method-bug-workaround)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
666
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
667 ;; While we're at it, a similar mechanism will make colon equivalent
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
668 ;; to doublequote for diaeresis processing. Some Xlibs do this.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
669 (defun alias-colon-to-doublequote (keymap)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
670 (map-keymap
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
671 (lambda (key value)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
672 (when (keymapp value)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
673 (alias-colon-to-doublequote value))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
674 (when (eq key '\")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
675 (define-key keymap ":" value)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
676 keymap))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
677 (alias-colon-to-doublequote compose-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
678 (unintern 'alias-colon-to-doublequote)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
679
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
680 ;;; Electric dead keys: making a' mean a-acute.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
681
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
682
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
683 (defun electric-diacritic (&optional count)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
684 "Modify the previous character with an accent.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
685 For example, if `:' is bound to this command, then typing `a:'
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
686 will first insert `a' and then turn it into `\344' (adiaeresis).
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
687 The keys to which this command may be bound (and the accents
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
688 which it understands) are:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
689
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
690 ' (acute) \301\311\315\323\332\335 \341\351\355\363\372\375
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
691 ` (grave) \300\310\314\322\331 \340\350\354\362\371
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
692 : (diaeresis) \304\313\317\326\334 \344\353\357\366\374\377
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
693 ^ (circumflex) \302\312\316\324\333 \342\352\356\364\373
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
694 , (cedilla) \307\347
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
695 . (ring) \305\345"
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
696 (interactive "p")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
697 (or count (setq count 1))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
698
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
699 (if (not (eq last-command 'self-insert-command))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
700 ;; Only do the magic if the two chars were typed in succession.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
701 (self-insert-command count)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
702
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
703 ;; This is so that ``a : C-x u'' will transform `adiaeresis' back into `a:'
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
704 (self-insert-command count)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
705 (undo-boundary)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
706 (delete-char (- count))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
707
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
708 (let* ((c last-command-char)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
709 (map (cond ((eq c ?') compose-acute-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
710 ((eq c ?`) compose-grave-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
711 ((eq c ?,) compose-cedilla-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
712 ((eq c ?:) compose-diaeresis-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
713 ((eq c ?^) compose-circumflex-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
714 ((eq c ?~) compose-tilde-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
715 ((eq c ?.) compose-ring-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
716 (t (error "unknown diacritic: %s (%c)" c c))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
717 (base-char (preceding-char))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
718 (mod-char (and (>= (downcase base-char) ?a) ; only do alphabetics?
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
719 (<= (downcase base-char) ?z)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
720 (lookup-key map (make-string 1 base-char)))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
721 (if (and (vectorp mod-char) (= (length mod-char) 1))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
722 (setq mod-char (aref mod-char 0)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
723 (if (and mod-char (symbolp mod-char))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
724 (setq mod-char (or (get mod-char character-set-property) mod-char)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
725 (if (and mod-char (> count 0))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
726 (delete-char -1)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
727 (setq mod-char c))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
728 (while (> count 0)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
729 (insert mod-char)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
730 (setq count (1- count))))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
731
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
732 ;; should "::" mean "¨" and ": " mean ":"?
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
733 ;; should we also do
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
734 ;; (?~
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
735 ;; (?A "\303")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
736 ;; (?C "\307")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
737 ;; (?D "\320")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
738 ;; (?N "\321")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
739 ;; (?O "\325")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
740 ;; (?a "\343")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
741 ;; (?c "\347")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
742 ;; (?d "\360")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
743 ;; (?n "\361")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
744 ;; (?o "\365")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
745 ;; (?> "\273")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
746 ;; (?< "\253")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
747 ;; (? "~")) ; no special code
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
748 ;; (?\/
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
749 ;; (?A "\305") ;; A-with-ring (Norwegian and Danish)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
750 ;; (?E "\306") ;; AE-ligature (Norwegian and Danish)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
751 ;; (?O "\330")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
752 ;; (?a "\345") ;; a-with-ring (Norwegian and Danish)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
753 ;; (?e "\346") ;; ae-ligature (Norwegian and Danish)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
754 ;; (?o "\370")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
755 ;; (? "/")) ; no special code
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
756
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
757
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
758 ;;; Providing help in the middle of a compose sequence. (Way cool.)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
759
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
760 (eval-when-compile
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
761 (defsubst next-composable-event ()
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
762 (let (event)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
763 (while (progn
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
764 (setq event (next-command-event))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
765 (not (or (key-press-event-p event)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
766 (button-press-event-p event))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
767 (dispatch-event event))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
768 event)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
769
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
770 (defun compose-help (ignore-prompt)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
771 (let* ((keys (apply 'vector (nbutlast (append (this-command-keys) nil))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
772 (map (or (lookup-key function-key-map keys)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
773 (error "can't find map? %s %s" keys (this-command-keys))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
774 binding)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
775 (save-excursion
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
776 (with-output-to-temp-buffer "*Help*"
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
777 (set-buffer "*Help*")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
778 (erase-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
779 (message "Working...")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
780 (setq ctl-arrow 'compose) ; non-t-non-nil
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
781 (insert "You are typing a compose sequence. So far you have typed: ")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
782 (insert (key-description keys))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
783 (insert "\nCompletions from here are:\n\n")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
784 (map-keymap 'compose-help-mapper map t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
785 (message "? ")))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
786 (while (keymapp map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
787 (setq binding (lookup-key map (vector (next-composable-event))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
788 (if (null binding)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
789 (message "No such key in keymap. Try again.")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
790 (setq map binding)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
791 binding))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
792
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
793 (put 'compose-help 'isearch-command t) ; so that it doesn't terminate isearch
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
794
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
795 (defun compose-help-mapper (key binding)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
796 (if (and (symbolp key)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
797 (get key character-set-property))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
798 (setq key (get key character-set-property)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
799 (if (eq binding 'compose-help) ; suppress that...
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
800 nil
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
801 (if (keymapp binding)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
802 (let ((p (point)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
803 (map-keymap 'compose-help-mapper binding t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
804 (goto-char p)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
805 (while (not (eobp))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
806 (if (characterp key)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
807 (insert (make-string 1 key))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
808 (insert (single-key-description key)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
809 (insert " ")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
810 (forward-line 1)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
811 (if (characterp key)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
812 (insert (make-string 1 key))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
813 (insert (single-key-description key)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
814 (indent-to 16)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
815 (let ((code (and (vectorp binding)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
816 (= 1 (length binding))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
817 (get (aref binding 0) character-set-property))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
818 (if code
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
819 (insert (make-string 1 code))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
820 (if (stringp binding)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
821 (insert binding)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
822 (insert (prin1-to-string binding)))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
823 (when (and (vectorp binding) (= 1 (length binding)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
824 (indent-to 32)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
825 (insert (symbol-name (aref binding 0)))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
826 (insert "\n")))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
827
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
828 ;; define it at top-level in the compose map...
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
829 ;;(define-key compose-map [(control h)] 'compose-help)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
830 ;;(define-key compose-map [help] 'compose-help)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
831 ;; and then define it in each sub-map of the compose map.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
832 (map-keymap
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
833 (lambda (key binding)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
834 (when (keymapp binding)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
835 ;; (define-key binding [(control h)] 'compose-help)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
836 ;; (define-key binding [help] 'compose-help)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
837 ))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
838 compose-map nil)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
839
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
840 ;; Make redisplay display the accented letters
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
841 (if (memq (default-value 'ctl-arrow) '(t nil))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
842 (setq-default ctl-arrow 'iso-8859/1))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
843
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
844
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
845 (provide 'x-compose)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
846
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
847 ;;; x-compose.el ends here