Mercurial > hg > xemacs-beta
comparison lisp/x-compose.el @ 4627:fdc76fec36d3
Vastly expand the characters x-compose.el supports.
2009-03-01 Aidan Kehoe <kehoea@parhasard.net>
* x-compose.el:
Document an XIM bug, and how one might work around it.
(define-compose-map):
Revise this macro, call it with compose-caron-map,
compose-macron-map, compose-breve-map, compose-dot-map,
compose-doubleacute-map, compose-ogonek-map, compose-hook-map,
compose-horn-map as well as the previous existing maps.
(compose-map):
Add entries for caron, macron, doubleacute, ogonek, breve and
abovedot to this map.
Add an assert, this code assumes that a non-Mule build has no
character codes above U+00FF.
Incorporate all the precomposed Latin characters in
UnicodeData.txt that we can into the maps, deciding at runtime on
which exactly depending on whether this is a non-Mule or a Mule
build.
Remove a commented-out old X11 bug workaround.
Use #'flet instead of defun + unintern for
#'alias-colon-to-doublequote.
Correct #'electric-diacritic to work with the keyboard macro
versions of the maps.
(compose-help):
This has been turned off since 1994; no-one appears to have
noticed, since the normal help mechanism offers similar
functionality and is actually maintained. Removed entirely.
Remove a superflous setting of a default value for ctl-arrow.
* x-init.el (x-initialize-compose):
Support the new dead key maps we just added to x-compose.el with
autoloads here.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 01 Mar 2009 11:11:46 +0000 |
parents | e34711681f30 |
children | dceee3855f15 |
comparison
equal
deleted
inserted
replaced
4626:f1bb4cc3144a | 4627:fdc76fec36d3 |
---|---|
98 | 98 |
99 ;; This code has one feature that a more "builtin" Compose mechanism could | 99 ;; This code has one feature that a more "builtin" Compose mechanism could |
100 ;; not have: at any point you can type C-h to get a list of the possible | 100 ;; not have: at any point you can type C-h to get a list of the possible |
101 ;; completions of what you have typed so far. | 101 ;; completions of what you have typed so far. |
102 | 102 |
103 ;; ---------------------------------------------------------------------- | |
104 ;; | |
105 ;; Notes from Aidan Kehoe, Thu Feb 12 16:21:18 GMT 2009 (these conflict to | |
106 ;; some extent with the above): | |
107 | |
103 ;; Giacomo Boffi's problem of | 108 ;; Giacomo Boffi's problem of |
104 ;; 20050324103919.8D22E4901@boffi95.stru.polimi.it is caused by Xlib doing | 109 ;; 20050324103919.8D22E4901@boffi95.stru.polimi.it is caused by Xlib doing |
105 ;; the compose processing. To turn that off, I'm not certain what's | 110 ;; the compose processing. To turn that off, you need to recompile without |
106 ;; possible, beyond making C the current locale. | 111 ;; XIM support, or start up XEmacs in a locale that the system supports but |
112 ;; X11 does not (for me, ru_RU.CP866 works for this). This will be | |
113 ;; preferable anyway for some people, because the XIM support drops | |
114 ;; sequences we would prefer to see. E.g. in the following situation, with | |
115 ;; an XIM build: | |
116 | |
117 ;; $ LC_CTYPE=de_DE.ISO8859-1 ./xemacs -vanilla & | |
118 | |
119 ;; Input: dead-acute a | |
120 ;; Seen by XEmacs: aacute (thanks to XIM) | |
121 ;; Action: U+00E1 is inserted in the buffer | |
122 | |
123 ;; Input: dead-abovedot o | |
124 ;; Seen by XEmacs: dead-abovedot o (XIM does not intervene, since no | |
125 ;; characters in this locale are generated with | |
126 ;; dead-abovedot) | |
127 ;; Action: U+022F is inserted in the buffer (thanks to this file) | |
128 | |
129 ;; Input: dead-acute r | |
130 ;; Seen by XEmacs: nothing (thanks to XIM, it considers U+0155 unavailable) | |
131 ;; Action: nothing | |
132 | |
133 ;; Without XIM, all the above inputs would work fine, independent of your | |
134 ;; locale. | |
135 | |
136 ;; Also, XIM does not intervene at all with the second or subsequent X11 | |
137 ;; devices created, and this file is needed for compose processing | |
138 ;; there. This may be a bug in our use of XIM, or it may a bug in XIM | |
139 ;; itself. | |
107 | 140 |
108 ;;; Code: | 141 ;;; Code: |
109 | 142 |
110 (macrolet | 143 (macrolet |
111 ((define-compose-map (keymap-symbol) | 144 ((define-compose-map (&rest keymap-symbols) |
112 `(progn | 145 (loop |
113 (defconst ,keymap-symbol (make-sparse-keymap ',keymap-symbol)) | 146 for keymap-symbol in keymap-symbols |
147 with result = nil | |
148 do | |
114 ;; Required to tell XEmacs the keymaps were actually autoloaded. | 149 ;; Required to tell XEmacs the keymaps were actually autoloaded. |
115 ;; #### Make this unnecessary! | 150 ;; #### Make this unnecessary! |
116 (fset ',keymap-symbol ,keymap-symbol)))) | 151 (push `(fset ',keymap-symbol ,keymap-symbol) result) |
117 | 152 (push `(defconst ,keymap-symbol (make-sparse-keymap ',keymap-symbol)) |
118 (define-compose-map compose-map) | 153 result) |
119 (define-compose-map compose-acute-map) | 154 finally return (cons 'progn result)))) |
120 (define-compose-map compose-grave-map) | 155 (define-compose-map compose-map compose-acute-map compose-grave-map |
121 (define-compose-map compose-cedilla-map) | 156 compose-cedilla-map compose-diaeresis-map compose-circumflex-map |
122 (define-compose-map compose-diaeresis-map) | 157 compose-tilde-map compose-ring-map compose-caron-map compose-macron-map |
123 (define-compose-map compose-circumflex-map) | 158 compose-breve-map compose-dot-map compose-doubleacute-map |
124 (define-compose-map compose-tilde-map) | 159 compose-ogonek-map compose-hook-map compose-horn-map)) |
125 (define-compose-map compose-ring-map)) | |
126 | 160 |
127 (define-key compose-map 'acute compose-acute-map) | 161 (define-key compose-map 'acute compose-acute-map) |
128 (define-key compose-map 'grave compose-grave-map) | 162 (define-key compose-map 'grave compose-grave-map) |
129 (define-key compose-map 'cedilla compose-cedilla-map) | 163 (define-key compose-map 'cedilla compose-cedilla-map) |
130 (define-key compose-map 'diaeresis compose-diaeresis-map) | 164 (define-key compose-map 'diaeresis compose-diaeresis-map) |
131 (define-key compose-map 'circumflex compose-circumflex-map) | 165 (define-key compose-map 'circumflex compose-circumflex-map) |
132 (define-key compose-map 'tilde compose-tilde-map) | 166 (define-key compose-map 'tilde compose-tilde-map) |
133 (define-key compose-map 'degree compose-ring-map) | 167 (define-key compose-map 'degree compose-ring-map) |
168 (define-key compose-map 'caron compose-caron-map) | |
169 (define-key compose-map 'macron compose-macron-map) | |
170 (define-key compose-map 'doubleacute compose-doubleacute-map) | |
171 (define-key compose-map 'ogonek compose-ogonek-map) | |
172 (define-key compose-map 'breve compose-breve-map) | |
173 (define-key compose-map 'abovedot compose-dot-map) | |
134 | 174 |
135 ;;(define-key function-key-map [multi-key] compose-map) | 175 ;;(define-key function-key-map [multi-key] compose-map) |
136 | 176 |
137 ;; The following is necessary, because one can't rebind [degree] | 177 ;; The following is necessary, because one can't rebind [degree] |
138 ;; and use it to insert the degree sign! | 178 ;; and use it to insert the degree sign! |
154 (define-key compose-map [tilde] compose-tilde-map) | 194 (define-key compose-map [tilde] compose-tilde-map) |
155 (define-key compose-map [~] compose-tilde-map) | 195 (define-key compose-map [~] compose-tilde-map) |
156 (define-key compose-map [degree] compose-ring-map) | 196 (define-key compose-map [degree] compose-ring-map) |
157 (define-key compose-map [?*] compose-ring-map) | 197 (define-key compose-map [?*] compose-ring-map) |
158 | 198 |
199 (loop | |
200 for (keysym character-code map) | |
201 in '((caron #x02C7 compose-caron-map) | |
202 (macron #x00AF compose-macron-map) | |
203 (doubleacute #x02DD compose-doubleacute-map) | |
204 (ogonek #x02db compose-ogonek-map) | |
205 (breve #x0306 compose-breve-map) | |
206 (abovedot #x0307 compose-dot-map) | |
207 (U031b #x031b compose-horn-map)) | |
208 do | |
209 (define-key compose-map (vector keysym) map) | |
210 (when (setq character-code (decode-char 'ucs character-code)) | |
211 (define-key compose-map (vector character-code) map))) | |
212 | |
159 | 213 |
160 ;;; The contents of the "dead key" maps. These are shared by the | 214 ;;; The contents of the "dead key" maps. These are shared by the |
161 ;;; compose-map. | 215 ;;; compose-map. |
162 | 216 |
163 ;;; These used to all have nice readable X11-oriented keysym names as the | 217 ;;; Against the spirit of Unicode, which says that the precomposed |
164 ;;; macro definition in the third argument, but I moved the interpretation | 218 ;;; characters are just there for round-trip compatibility with other |
165 ;;; of those mappings (that is, Aacute to \301, &c.) to runtime in the X11 | 219 ;;; encodings and don't reflect that they're necessarily used much, these |
166 ;;; code on first sight of the symbols--which is the more general solution, | 220 ;;; are just the precomposed Latin characters in UnicodeData.txt; we don't |
167 ;;; what with Unicode keysyms, publishing, technical and so on, there's no | 221 ;;; support any decomposed characters here. (Not least because in general we |
168 ;;; need to have them hanging around as symbols all the time--so they're no | 222 ;;; don't have worthwhile support for precomposed characters.) |
169 ;;; longer available to Lisp before X11 sees them, something this relied on. | 223 |
170 | 224 (assert |
171 ;;; The transformation was done like so; | 225 (or (featurep 'mule) (null (decode-char 'ucs #x100))) |
172 | 226 nil |
173 ;;; (while (re-search-forward "\\[\\([a-zA-Z]+\\)\\])$" nil t) | 227 "This code assumes no non-Mule characters have a UCS value \ |
174 ;;; (replace-match (format "(?\\%o)" | 228 greater than #xFF, and needs to be rewritten if that is not true.") |
175 ;;; (get (intern (match-string 1)) 'character-of-keysym)) | 229 |
176 ;;; t t nil 1)) | 230 (macrolet |
177 | 231 ((decide-on-bindings (&rest details) |
178 ;;; with a lot of repeated calling of setxkbmap to esoteric keymaps--so | 232 "Look through DETAILS, working out which bindings work on non-Mule. |
179 ;;; x_reset_key_mapping gets called for all the keys on the keyboard--yacute | 233 |
180 ;;; getting picked up from the Czech keymap, idiaeresis from the Dutch one, | 234 This returns a long `if' statement that should be executed when this file is |
181 ;;; and many more (al, ca, cz, de, dvorak, ee, es, fi, fr, hu, | 235 loaded; it assumes that #xFF is the inclusive upper bound for the Unicode |
182 ;;; ie(UnicodeExpert), it, nl, pt, ro, tr, us, vn, if it interests you.) | 236 value of characters under non-Mule. " |
183 | 237 (loop for (map key binding) in details |
184 ;;; The parentheses inside the vector are because otherwise the macro gets | 238 with if-mule = nil |
185 ;;; interpreted as a meta character, the Latin-1 codes being in exactly that | 239 with without-mule = nil |
186 ;;; range. Perhaps that bears documenting somewhere. Also, why is help | 240 do |
187 ;;; turned off for these (x-compose) sequences by default? | 241 (push `(define-key ,map ,key |
188 | 242 (vector (list (decode-char 'ucs ,binding)))) if-mule) |
189 ;;; (Aidan Kehoe, 2005-05-18) | 243 (when (<= binding #xFF) |
190 | 244 (push `(define-key ,map ,key |
191 (define-key compose-acute-map [space] "'") | 245 (vector (list (decode-char 'ucs ,binding)))) |
192 (define-key compose-acute-map [?'] [(?\264)]) | 246 without-mule)) |
193 (define-key compose-acute-map [?A] [(?\301)]) | 247 finally return `(if (featurep 'mule) |
194 (define-key compose-acute-map [E] [(?\311)]) | 248 (progn ,@if-mule) |
195 (define-key compose-acute-map [I] [(?\315)]) | 249 ,@without-mule)))) |
196 (define-key compose-acute-map [O] [(?\323)]) | 250 (decide-on-bindings |
197 (define-key compose-acute-map [U] [(?\332)]) | 251 (compose-acute-map [space] #x0027) ;; APOSTROPHE |
198 (define-key compose-acute-map [Y] [(?\335)]) | 252 (compose-acute-map [?\'] #x00B4) ;; ACUTE ACCENT |
199 (define-key compose-acute-map [a] [(?\341)]) | 253 (compose-acute-map [?A] #x00C1) ;; CAPITAL A WITH ACUTE |
200 (define-key compose-acute-map [e] [(?\351)]) | 254 (compose-acute-map [?C] #x0106) ;; CAPITAL C WITH ACUTE |
201 (define-key compose-acute-map [i] [(?\355)]) | 255 (compose-acute-map [?E] #x00C9) ;; CAPITAL E WITH ACUTE |
202 (define-key compose-acute-map [o] [(?\363)]) | 256 (compose-acute-map [?G] #x01F4) ;; CAPITAL G WITH ACUTE |
203 (define-key compose-acute-map [u] [(?\372)]) | 257 (compose-acute-map [?I] #x00CD) ;; CAPITAL I WITH ACUTE |
204 (define-key compose-acute-map [y] [(?\375)]) | 258 (compose-acute-map [?K] #x1E30) ;; CAPITAL K WITH ACUTE |
205 | 259 (compose-acute-map [?L] #x0139) ;; CAPITAL L WITH ACUTE |
206 (define-key compose-grave-map [space] "`") | 260 (compose-acute-map [?M] #x1E3E) ;; CAPITAL M WITH ACUTE |
207 (define-key compose-grave-map [?`] [(?\140)]) | 261 (compose-acute-map [?N] #x0143) ;; CAPITAL N WITH ACUTE |
208 (define-key compose-grave-map [A] [(?\300)]) | 262 (compose-acute-map [?O] #x00D3) ;; CAPITAL O WITH ACUTE |
209 (define-key compose-grave-map [E] [(?\310)]) | 263 (compose-acute-map [?P] #x1E54) ;; CAPITAL P WITH ACUTE |
210 (define-key compose-grave-map [I] [(?\314)]) | 264 (compose-acute-map [?R] #x0154) ;; CAPITAL R WITH ACUTE |
211 (define-key compose-grave-map [O] [(?\322)]) | 265 (compose-acute-map [?S] #x015A) ;; CAPITAL S WITH ACUTE |
212 (define-key compose-grave-map [U] [(?\331)]) | 266 (compose-acute-map [?U] #x00DA) ;; CAPITAL U WITH ACUTE |
213 (define-key compose-grave-map [a] [(?\340)]) | 267 (compose-acute-map [?W] #x1E82) ;; CAPITAL W WITH ACUTE |
214 (define-key compose-grave-map [e] [(?\350)]) | 268 (compose-acute-map [?Y] #x00DD) ;; CAPITAL Y WITH ACUTE |
215 (define-key compose-grave-map [i] [(?\354)]) | 269 (compose-acute-map [?Z] #x0179) ;; CAPITAL Z WITH ACUTE |
216 (define-key compose-grave-map [o] [(?\362)]) | 270 (compose-acute-map [?a] #x00E1) ;; SMALL A WITH ACUTE |
217 (define-key compose-grave-map [u] [(?\371)]) | 271 (compose-acute-map [?c] #x0107) ;; SMALL C WITH ACUTE |
218 | 272 (compose-acute-map [?e] #x00E9) ;; SMALL E WITH ACUTE |
219 (define-key compose-cedilla-map [space] ",") | 273 (compose-acute-map [?g] #x01F5) ;; SMALL G WITH ACUTE |
220 (define-key compose-cedilla-map [?,] [(?\270)]) | 274 (compose-acute-map [?i] #x00ED) ;; SMALL I WITH ACUTE |
221 (define-key compose-cedilla-map [C] [(?\307)]) | 275 (compose-acute-map [?k] #x1E31) ;; SMALL K WITH ACUTE |
222 (define-key compose-cedilla-map [c] [(?\347)]) | 276 (compose-acute-map [?l] #x013A) ;; SMALL L WITH ACUTE |
223 | 277 (compose-acute-map [?m] #x1E3F) ;; SMALL M WITH ACUTE |
224 (define-key compose-diaeresis-map [space] [(?\250)]) | 278 (compose-acute-map [?n] #x0144) ;; SMALL N WITH ACUTE |
225 (define-key compose-diaeresis-map [?\"] [(?\250)]) | 279 (compose-acute-map [?o] #x00F3) ;; SMALL O WITH ACUTE |
226 (define-key compose-diaeresis-map [A] [(?\304)]) | 280 (compose-acute-map [?p] #x1E55) ;; SMALL P WITH ACUTE |
227 (define-key compose-diaeresis-map [E] [(?\313)]) | 281 (compose-acute-map [?r] #x0155) ;; SMALL R WITH ACUTE |
228 (define-key compose-diaeresis-map [I] [(?\317)]) | 282 (compose-acute-map [?s] #x015B) ;; SMALL S WITH ACUTE |
229 (define-key compose-diaeresis-map [O] [(?\326)]) | 283 (compose-acute-map [?u] #x00FA) ;; SMALL U WITH ACUTE |
230 (define-key compose-diaeresis-map [U] [(?\334)]) | 284 (compose-acute-map [?w] #x1E83) ;; SMALL W WITH ACUTE |
231 (define-key compose-diaeresis-map [a] [(?\344)]) | 285 (compose-acute-map [?y] #x00FD) ;; SMALL Y WITH ACUTE |
232 (define-key compose-diaeresis-map [e] [(?\353)]) | 286 (compose-acute-map [?z] #x017A) ;; SMALL Z WITH ACUTE |
233 (define-key compose-diaeresis-map [i] [(?\357)]) | 287 (compose-grave-map [space] #x0060) ;; GRAVE ACCENT |
234 (define-key compose-diaeresis-map [o] [(?\366)]) | 288 (compose-grave-map [?\`] #x0060) ;; GRAVE ACCENT |
235 ;; Not strictly a diaeresis, but close enough for government work. | 289 (compose-grave-map [?A] #x00C0) ;; CAPITAL A WITH GRAVE |
236 (define-key compose-diaeresis-map [s] [(?\337)]) | 290 (compose-grave-map [?E] #x00C8) ;; CAPITAL E WITH GRAVE |
237 (define-key compose-diaeresis-map [u] [(?\374)]) | 291 (compose-grave-map [?I] #x00CC) ;; CAPITAL I WITH GRAVE |
238 (define-key compose-diaeresis-map [y] [(?\377)]) | 292 (compose-grave-map [?N] #x01F8) ;; CAPITAL N WITH GRAVE |
239 | 293 (compose-grave-map [?O] #x00D2) ;; CAPITAL O WITH GRAVE |
240 (define-key compose-circumflex-map [space] "^") | 294 (compose-grave-map [?U] #x00D9) ;; CAPITAL U WITH GRAVE |
241 (define-key compose-circumflex-map [?/] "|") | 295 (compose-grave-map [?W] #x1E80) ;; CAPITAL W WITH GRAVE |
242 (define-key compose-circumflex-map [?!] [(?\246)]) | 296 (compose-grave-map [?Y] #x1EF2) ;; CAPITAL Y WITH GRAVE |
243 (define-key compose-circumflex-map [?-] [(?\257)]) | 297 (compose-grave-map [?a] #x00E0) ;; SMALL A WITH GRAVE |
244 (define-key compose-circumflex-map [?_] [(?\257)]) | 298 (compose-grave-map [?e] #x00E8) ;; SMALL E WITH GRAVE |
245 (define-key compose-circumflex-map [?0] [(?\260)]) | 299 (compose-grave-map [?i] #x00EC) ;; SMALL I WITH GRAVE |
246 (define-key compose-circumflex-map [?1] [(?\271)]) | 300 (compose-grave-map [?n] #x01F9) ;; SMALL N WITH GRAVE |
247 (define-key compose-circumflex-map [?2] [(?\262)]) | 301 (compose-grave-map [?o] #x00F2) ;; SMALL O WITH GRAVE |
248 (define-key compose-circumflex-map [?3] [(?\263)]) | 302 (compose-grave-map [?u] #x00F9) ;; SMALL U WITH GRAVE |
249 (define-key compose-circumflex-map [?.] [(?\267)]) | 303 (compose-grave-map [?w] #x1E81) ;; SMALL W WITH GRAVE |
250 (define-key compose-circumflex-map [A] [(?\302)]) | 304 (compose-grave-map [?y] #x1EF3) ;; SMALL Y WITH GRAVE |
251 (define-key compose-circumflex-map [E] [(?\312)]) | 305 (compose-cedilla-map [space] #x002C) ;; COMMA |
252 (define-key compose-circumflex-map [I] [(?\316)]) | 306 (compose-cedilla-map [?\,] #x00B8) ;; CEDILLA |
253 (define-key compose-circumflex-map [O] [(?\324)]) | 307 (compose-cedilla-map [C] #x00C7) ;; CAPITAL C WITH CEDILLA |
254 (define-key compose-circumflex-map [U] [(?\333)]) | 308 (compose-cedilla-map [D] #x1E10) ;; CAPITAL D WITH CEDILLA |
255 (define-key compose-circumflex-map [a] [(?\342)]) | 309 (compose-cedilla-map [E] #x0228) ;; CAPITAL E WITH CEDILLA |
256 (define-key compose-circumflex-map [e] [(?\352)]) | 310 (compose-cedilla-map [G] #x0122) ;; CAPITAL G WITH CEDILLA |
257 (define-key compose-circumflex-map [i] [(?\356)]) | 311 (compose-cedilla-map [H] #x1E28) ;; CAPITAL H WITH CEDILLA |
258 (define-key compose-circumflex-map [o] [(?\364)]) | 312 (compose-cedilla-map [K] #x0136) ;; CAPITAL K WITH CEDILLA |
259 (define-key compose-circumflex-map [u] [(?\373)]) | 313 (compose-cedilla-map [L] #x013B) ;; CAPITAL L WITH CEDILLA |
260 | 314 (compose-cedilla-map [N] #x0145) ;; CAPITAL N WITH CEDILLA |
261 (define-key compose-tilde-map [space] "~") | 315 (compose-cedilla-map [R] #x0156) ;; CAPITAL R WITH CEDILLA |
262 (define-key compose-tilde-map [A] [(?\303)]) | 316 (compose-cedilla-map [S] #x015E) ;; CAPITAL S WITH CEDILLA |
263 (define-key compose-tilde-map [N] [(?\321)]) | 317 (compose-cedilla-map [T] #x0162) ;; CAPITAL T WITH CEDILLA |
264 (define-key compose-tilde-map [O] [(?\325)]) | 318 (compose-cedilla-map [c] #x00E7) ;; SMALL C WITH CEDILLA |
265 (define-key compose-tilde-map [a] [(?\343)]) | 319 (compose-cedilla-map [d] #x1E11) ;; SMALL D WITH CEDILLA |
266 (define-key compose-tilde-map [n] [(?\361)]) | 320 (compose-cedilla-map [e] #x0229) ;; SMALL E WITH CEDILLA |
267 (define-key compose-tilde-map [o] [(?\365)]) | 321 (compose-cedilla-map [g] #x0123) ;; SMALL G WITH CEDILLA |
268 | 322 (compose-cedilla-map [h] #x1E29) ;; SMALL H WITH CEDILLA |
269 (define-key compose-ring-map [space] [(?\260)]) | 323 (compose-cedilla-map [k] #x0137) ;; SMALL K WITH CEDILLA |
270 (define-key compose-ring-map [A] [(?\305)]) | 324 (compose-cedilla-map [l] #x013C) ;; SMALL L WITH CEDILLA |
271 (define-key compose-ring-map [a] [(?\345)]) | 325 (compose-cedilla-map [n] #x0146) ;; SMALL N WITH CEDILLA |
326 (compose-cedilla-map [r] #x0157) ;; SMALL R WITH CEDILLA | |
327 (compose-cedilla-map [s] #x015F) ;; SMALL S WITH CEDILLA | |
328 (compose-cedilla-map [t] #x0163) ;; SMALL T WITH CEDILLA | |
329 (compose-diaeresis-map [space] #x00A8) ;; DIAERESIS | |
330 (compose-diaeresis-map [?\"] #x00A8) ;; DIAERESIS | |
331 (compose-diaeresis-map [?s] #x00DF) ;; SMALL SHARP S | |
332 (compose-diaeresis-map [?A] #x00C4) ;; CAPITAL A WITH DIAERESIS | |
333 (compose-diaeresis-map [?E] #x00CB) ;; CAPITAL E WITH DIAERESIS | |
334 (compose-diaeresis-map [?H] #x1E26) ;; CAPITAL H WITH DIAERESIS | |
335 (compose-diaeresis-map [?I] #x00CF) ;; CAPITAL I WITH DIAERESIS | |
336 (compose-diaeresis-map [?O] #x00D6) ;; CAPITAL O WITH DIAERESIS | |
337 (compose-diaeresis-map [?U] #x00DC) ;; CAPITAL U WITH DIAERESIS | |
338 (compose-diaeresis-map [?W] #x1E84) ;; CAPITAL W WITH DIAERESIS | |
339 (compose-diaeresis-map [?X] #x1E8C) ;; CAPITAL X WITH DIAERESIS | |
340 (compose-diaeresis-map [?Y] #x0178) ;; CAPITAL Y WITH DIAERESIS | |
341 (compose-diaeresis-map [?a] #x00E4) ;; SMALL A WITH DIAERESIS | |
342 (compose-diaeresis-map [?e] #x00EB) ;; SMALL E WITH DIAERESIS | |
343 (compose-diaeresis-map [?h] #x1E27) ;; SMALL H WITH DIAERESIS | |
344 (compose-diaeresis-map [?i] #x00EF) ;; SMALL I WITH DIAERESIS | |
345 (compose-diaeresis-map [?o] #x00F6) ;; SMALL O WITH DIAERESIS | |
346 (compose-diaeresis-map [?t] #x1E97) ;; SMALL T WITH DIAERESIS | |
347 (compose-diaeresis-map [?u] #x00FC) ;; SMALL U WITH DIAERESIS | |
348 (compose-diaeresis-map [?w] #x1E85) ;; SMALL W WITH DIAERESIS | |
349 (compose-diaeresis-map [?x] #x1E8D) ;; SMALL X WITH DIAERESIS | |
350 (compose-diaeresis-map [?y] #x00FF) ;; SMALL Y WITH DIAERESIS | |
351 (compose-circumflex-map [space] #x005e) ;; CIRCUMFLEX ACCENT | |
352 (compose-circumflex-map [?A] #x00C2) ;; CAPITAL A WITH CIRCUMFLEX | |
353 (compose-circumflex-map [?C] #x0108) ;; CAPITAL C WITH CIRCUMFLEX | |
354 (compose-circumflex-map [?E] #x00CA) ;; CAPITAL E WITH CIRCUMFLEX | |
355 (compose-circumflex-map [?G] #x011C) ;; CAPITAL G WITH CIRCUMFLEX | |
356 (compose-circumflex-map [?H] #x0124) ;; CAPITAL H WITH CIRCUMFLEX | |
357 (compose-circumflex-map [?I] #x00CE) ;; CAPITAL I WITH CIRCUMFLEX | |
358 (compose-circumflex-map [?J] #x0134) ;; CAPITAL J WITH CIRCUMFLEX | |
359 (compose-circumflex-map [?O] #x00D4) ;; CAPITAL O WITH CIRCUMFLEX | |
360 (compose-circumflex-map [?S] #x015C) ;; CAPITAL S WITH CIRCUMFLEX | |
361 (compose-circumflex-map [?U] #x00DB) ;; CAPITAL U WITH CIRCUMFLEX | |
362 (compose-circumflex-map [?W] #x0174) ;; CAPITAL W WITH CIRCUMFLEX | |
363 (compose-circumflex-map [?Y] #x0176) ;; CAPITAL Y WITH CIRCUMFLEX | |
364 (compose-circumflex-map [?Z] #x1E90) ;; CAPITAL Z WITH CIRCUMFLEX | |
365 (compose-circumflex-map [?a] #x00e2) ;; SMALL A WITH CIRCUMFLEX | |
366 (compose-circumflex-map [?c] #x0109) ;; SMALL C WITH CIRCUMFLEX | |
367 (compose-circumflex-map [?e] #x00ea) ;; SMALL E WITH CIRCUMFLEX | |
368 (compose-circumflex-map [?g] #x011d) ;; SMALL G WITH CIRCUMFLEX | |
369 (compose-circumflex-map [?h] #x0125) ;; SMALL H WITH CIRCUMFLEX | |
370 (compose-circumflex-map [?i] #x00ee) ;; SMALL I WITH CIRCUMFLEX | |
371 (compose-circumflex-map [?j] #x0135) ;; SMALL J WITH CIRCUMFLEX | |
372 (compose-circumflex-map [?o] #x00f4) ;; SMALL O WITH CIRCUMFLEX | |
373 (compose-circumflex-map [?s] #x015d) ;; SMALL S WITH CIRCUMFLEX | |
374 (compose-circumflex-map [?u] #x00fb) ;; SMALL U WITH CIRCUMFLEX | |
375 (compose-circumflex-map [?w] #x0175) ;; SMALL W WITH CIRCUMFLEX | |
376 (compose-circumflex-map [?y] #x0177) ;; SMALL Y WITH CIRCUMFLEX | |
377 (compose-circumflex-map [?z] #x1e91) ;; SMALL Z WITH CIRCUMFLEX | |
378 (compose-tilde-map [space] #x007E) ;; TILDE | |
379 (compose-tilde-map [?A] #x00C3) ;; CAPITAL A WITH TILDE | |
380 (compose-tilde-map [?E] #x1EBC) ;; CAPITAL E WITH TILDE | |
381 (compose-tilde-map [?I] #x0128) ;; CAPITAL I WITH TILDE | |
382 (compose-tilde-map [?N] #x00D1) ;; CAPITAL N WITH TILDE | |
383 (compose-tilde-map [?O] #x00D5) ;; CAPITAL O WITH TILDE | |
384 (compose-tilde-map [?U] #x0168) ;; CAPITAL U WITH TILDE | |
385 (compose-tilde-map [?V] #x1E7C) ;; CAPITAL V WITH TILDE | |
386 (compose-tilde-map [?Y] #x1EF8) ;; CAPITAL Y WITH TILDE | |
387 (compose-tilde-map [?a] #x00E3) ;; SMALL A WITH TILDE | |
388 (compose-tilde-map [?e] #x1EBD) ;; SMALL E WITH TILDE | |
389 (compose-tilde-map [?i] #x0129) ;; SMALL I WITH TILDE | |
390 (compose-tilde-map [?n] #x00F1) ;; SMALL N WITH TILDE | |
391 (compose-tilde-map [?o] #x00F5) ;; SMALL O WITH TILDE | |
392 (compose-tilde-map [?u] #x0169) ;; SMALL U WITH TILDE | |
393 (compose-tilde-map [?v] #x1E7D) ;; SMALL V WITH TILDE | |
394 (compose-tilde-map [?y] #x1EF9) ;; SMALL Y WITH TILDE | |
395 (compose-ring-map [space] #x00B0) ;; DEGREE SIGN | |
396 (compose-ring-map [?A] #x00C5) ;; CAPITAL A WITH RING ABOVE | |
397 (compose-ring-map [?U] #x016E) ;; CAPITAL U WITH RING ABOVE | |
398 (compose-ring-map [?a] #x00E5) ;; SMALL A WITH RING ABOVE | |
399 (compose-ring-map [?u] #x016F) ;; SMALL U WITH RING ABOVE | |
400 (compose-ring-map [?w] #x1E98) ;; SMALL W WITH RING ABOVE | |
401 (compose-ring-map [?y] #x1E99) ;; SMALL Y WITH RING ABOVE | |
402 (compose-caron-map [space] #x02C7) ;; CARON | |
403 (compose-caron-map [?A] #x01CD) ;; CAPITAL A WITH CARON | |
404 (compose-caron-map [?C] #x010C) ;; CAPITAL C WITH CARON | |
405 (compose-caron-map [?D] #x010E) ;; CAPITAL D WITH CARON | |
406 (compose-caron-map [U01F1] #x01C4) ;; CAPITAL DZ WITH CARON | |
407 (compose-caron-map [?E] #x011A) ;; CAPITAL E WITH CARON | |
408 (compose-caron-map [U01B7] #x01EE) ;; CAPITAL EZH WITH CARON | |
409 (compose-caron-map [?G] #x01E6) ;; CAPITAL G WITH CARON | |
410 (compose-caron-map [?H] #x021E) ;; CAPITAL H WITH CARON | |
411 (compose-caron-map [?I] #x01CF) ;; CAPITAL I WITH CARON | |
412 (compose-caron-map [?K] #x01E8) ;; CAPITAL K WITH CARON | |
413 (compose-caron-map [?L] #x013D) ;; CAPITAL L WITH CARON | |
414 (compose-caron-map [?N] #x0147) ;; CAPITAL N WITH CARON | |
415 (compose-caron-map [?O] #x01D1) ;; CAPITAL O WITH CARON | |
416 (compose-caron-map [?R] #x0158) ;; CAPITAL R WITH CARON | |
417 (compose-caron-map [?S] #x0160) ;; CAPITAL S WITH CARON | |
418 (compose-caron-map [?T] #x0164) ;; CAPITAL T WITH CARON | |
419 (compose-caron-map [?U] #x01D3) ;; CAPITAL U WITH CARON | |
420 (compose-caron-map [?Z] #x017D) ;; CAPITAL Z WITH CARON | |
421 (compose-caron-map [?a] #x01CE) ;; SMALL A WITH CARON | |
422 (compose-caron-map [?c] #x010D) ;; SMALL C WITH CARON | |
423 (compose-caron-map [?d] #x010F) ;; SMALL D WITH CARON | |
424 (compose-caron-map [U01F3] #x01C6) ;; SMALL DZ WITH CARON | |
425 (compose-caron-map [?e] #x011B) ;; SMALL E WITH CARON | |
426 (compose-caron-map [U0292] #x01EF) ;; SMALL EZH WITH CARON | |
427 (compose-caron-map [?g] #x01E7) ;; SMALL G WITH CARON | |
428 (compose-caron-map [?h] #x021F) ;; SMALL H WITH CARON | |
429 (compose-caron-map [?i] #x01D0) ;; SMALL I WITH CARON | |
430 (compose-caron-map [?j] #x01F0) ;; SMALL J WITH CARON | |
431 (compose-caron-map [?k] #x01E9) ;; SMALL K WITH CARON | |
432 (compose-caron-map [?l] #x013E) ;; SMALL L WITH CARON | |
433 (compose-caron-map [?n] #x0148) ;; SMALL N WITH CARON | |
434 (compose-caron-map [?o] #x01D2) ;; SMALL O WITH CARON | |
435 (compose-caron-map [?r] #x0159) ;; SMALL R WITH CARON | |
436 (compose-caron-map [?s] #x0161) ;; SMALL S WITH CARON | |
437 (compose-caron-map [?t] #x0165) ;; SMALL T WITH CARON | |
438 (compose-caron-map [?u] #x01D4) ;; SMALL U WITH CARON | |
439 (compose-caron-map [?z] #x017E) ;; SMALL Z WITH CARON | |
440 (compose-macron-map [space] #x00AF) ;; MACRON | |
441 (compose-macron-map [?A] #x0100) ;; CAPITAL A WITH MACRON | |
442 (compose-macron-map [AE] #x01E2) ;; CAPITAL AE WITH MACRON | |
443 (compose-macron-map [?E] #x0112) ;; CAPITAL E WITH MACRON | |
444 (compose-macron-map [?G] #x1E20) ;; CAPITAL G WITH MACRON | |
445 (compose-macron-map [?I] #x012A) ;; CAPITAL I WITH MACRON | |
446 (compose-macron-map [?O] #x014C) ;; CAPITAL O WITH MACRON | |
447 (compose-macron-map [?U] #x016A) ;; CAPITAL U WITH MACRON | |
448 (compose-macron-map [?Y] #x0232) ;; CAPITAL Y WITH MACRON | |
449 (compose-macron-map [?a] #x0101) ;; SMALL A WITH MACRON | |
450 (compose-macron-map [ae] #x01E3) ;; SMALL AE WITH MACRON | |
451 (compose-macron-map [?e] #x0113) ;; SMALL E WITH MACRON | |
452 (compose-macron-map [?g] #x1E21) ;; SMALL G WITH MACRON | |
453 (compose-macron-map [?i] #x012B) ;; SMALL I WITH MACRON | |
454 (compose-macron-map [?o] #x014D) ;; SMALL O WITH MACRON | |
455 (compose-macron-map [?u] #x016B) ;; SMALL U WITH MACRON | |
456 (compose-macron-map [?y] #x0233) ;; SMALL Y WITH MACRON | |
457 (compose-doubleacute-map [space] #x02DD) ;; DOUBLE ACUTE ACCENT | |
458 (compose-doubleacute-map [?O] #x0150) ;; CAPITAL O WITH DOUBLE ACUTE | |
459 (compose-doubleacute-map [?U] #x0170) ;; CAPITAL U WITH DOUBLE ACUTE | |
460 (compose-doubleacute-map [?o] #x0151) ;; SMALL O WITH DOUBLE ACUTE | |
461 (compose-doubleacute-map [?u] #x0171) ;; SMALL U WITH DOUBLE ACUTE | |
462 (compose-ogonek-map [space] #x02DB) ;; OGONEK | |
463 (compose-ogonek-map [?A] #x0104) ;; CAPITAL A WITH OGONEK | |
464 (compose-ogonek-map [?E] #x0118) ;; CAPITAL E WITH OGONEK | |
465 (compose-ogonek-map [?I] #x012E) ;; CAPITAL I WITH OGONEK | |
466 (compose-ogonek-map [?O] #x01EA) ;; CAPITAL O WITH OGONEK | |
467 (compose-ogonek-map [?U] #x0172) ;; CAPITAL U WITH OGONEK | |
468 (compose-ogonek-map [?a] #x0105) ;; SMALL A WITH OGONEK | |
469 (compose-ogonek-map [?e] #x0119) ;; SMALL E WITH OGONEK | |
470 (compose-ogonek-map [?i] #x012F) ;; SMALL I WITH OGONEK | |
471 (compose-ogonek-map [?o] #x01EB) ;; SMALL O WITH OGONEK | |
472 (compose-ogonek-map [?u] #x0173) ;; SMALL U WITH OGONEK | |
473 (compose-breve-map [space] #x02D8) ;; BREVE | |
474 (compose-breve-map [?A] #x0102) ;; CAPITAL A WITH BREVE | |
475 (compose-breve-map [?E] #x0114) ;; CAPITAL E WITH BREVE | |
476 (compose-breve-map [?G] #x011E) ;; CAPITAL G WITH BREVE | |
477 (compose-breve-map [?I] #x012C) ;; CAPITAL I WITH BREVE | |
478 (compose-breve-map [?O] #x014E) ;; CAPITAL O WITH BREVE | |
479 (compose-breve-map [?U] #x016C) ;; CAPITAL U WITH BREVE | |
480 (compose-breve-map [?a] #x0103) ;; SMALL A WITH BREVE | |
481 (compose-breve-map [?e] #x0115) ;; SMALL E WITH BREVE | |
482 (compose-breve-map [?g] #x011F) ;; SMALL G WITH BREVE | |
483 (compose-breve-map [?i] #x012D) ;; SMALL I WITH BREVE | |
484 (compose-breve-map [?o] #x014F) ;; SMALL O WITH BREVE | |
485 (compose-breve-map [?u] #x016D) ;; SMALL U WITH BREVE | |
486 (compose-dot-map [space] #x02D9) ;; DOT ABOVE | |
487 (compose-dot-map [?A] #x0226) ;; CAPITAL A WITH DOT ABOVE | |
488 (compose-dot-map [?B] #x1E02) ;; CAPITAL B WITH DOT ABOVE | |
489 (compose-dot-map [?C] #x010A) ;; CAPITAL C WITH DOT ABOVE | |
490 (compose-dot-map [?D] #x1E0A) ;; CAPITAL D WITH DOT ABOVE | |
491 (compose-dot-map [?E] #x0116) ;; CAPITAL E WITH DOT ABOVE | |
492 (compose-dot-map [?F] #x1E1E) ;; CAPITAL F WITH DOT ABOVE | |
493 (compose-dot-map [?G] #x0120) ;; CAPITAL G WITH DOT ABOVE | |
494 (compose-dot-map [?H] #x1E22) ;; CAPITAL H WITH DOT ABOVE | |
495 (compose-dot-map [?I] #x0130) ;; CAPITAL I WITH DOT ABOVE | |
496 (compose-dot-map [?M] #x1E40) ;; CAPITAL M WITH DOT ABOVE | |
497 (compose-dot-map [?N] #x1E44) ;; CAPITAL N WITH DOT ABOVE | |
498 (compose-dot-map [?O] #x022E) ;; CAPITAL O WITH DOT ABOVE | |
499 (compose-dot-map [?P] #x1E56) ;; CAPITAL P WITH DOT ABOVE | |
500 (compose-dot-map [?R] #x1E58) ;; CAPITAL R WITH DOT ABOVE | |
501 (compose-dot-map [?S] #x1E60) ;; CAPITAL S WITH DOT ABOVE | |
502 (compose-dot-map [?T] #x1E6A) ;; CAPITAL T WITH DOT ABOVE | |
503 (compose-dot-map [?W] #x1E86) ;; CAPITAL W WITH DOT ABOVE | |
504 (compose-dot-map [?X] #x1E8A) ;; CAPITAL X WITH DOT ABOVE | |
505 (compose-dot-map [?Y] #x1E8E) ;; CAPITAL Y WITH DOT ABOVE | |
506 (compose-dot-map [?Z] #x017B) ;; CAPITAL Z WITH DOT ABOVE | |
507 (compose-dot-map [?a] #x0227) ;; SMALL A WITH DOT ABOVE | |
508 (compose-dot-map [?b] #x1E03) ;; SMALL B WITH DOT ABOVE | |
509 (compose-dot-map [?c] #x010B) ;; SMALL C WITH DOT ABOVE | |
510 (compose-dot-map [?d] #x1E0B) ;; SMALL D WITH DOT ABOVE | |
511 (compose-dot-map [?e] #x0117) ;; SMALL E WITH DOT ABOVE | |
512 (compose-dot-map [?f] #x1E1F) ;; SMALL F WITH DOT ABOVE | |
513 (compose-dot-map [?g] #x0121) ;; SMALL G WITH DOT ABOVE | |
514 (compose-dot-map [?h] #x1E23) ;; SMALL H WITH DOT ABOVE | |
515 (compose-dot-map [U017F] #x1E9B) ;; SMALL LONG S WITH DOT ABOVE | |
516 (compose-dot-map [?m] #x1E41) ;; SMALL M WITH DOT ABOVE | |
517 (compose-dot-map [?n] #x1E45) ;; SMALL N WITH DOT ABOVE | |
518 (compose-dot-map [?o] #x022F) ;; SMALL O WITH DOT ABOVE | |
519 (compose-dot-map [?p] #x1E57) ;; SMALL P WITH DOT ABOVE | |
520 (compose-dot-map [?r] #x1E59) ;; SMALL R WITH DOT ABOVE | |
521 (compose-dot-map [?s] #x1E61) ;; SMALL S WITH DOT ABOVE | |
522 (compose-dot-map [?t] #x1E6B) ;; SMALL T WITH DOT ABOVE | |
523 (compose-dot-map [?w] #x1E87) ;; SMALL W WITH DOT ABOVE | |
524 (compose-dot-map [?x] #x1E8B) ;; SMALL X WITH DOT ABOVE | |
525 (compose-dot-map [?y] #x1E8F) ;; SMALL Y WITH DOT ABOVE | |
526 (compose-dot-map [?z] #x017C) ;; SMALL Z WITH DOT ABOVE | |
527 (compose-dot-map [?i] #x0131) ;; SMALL DOTLESS I | |
528 (compose-dot-map [?j] #x0237) ;; SMALL DOTLESS J | |
529 ;; There is nothing obvious we can bind space to on compose-hook-map, | |
530 ;; these are IPA characters that are in Unicode theory not | |
531 ;; precomposed. | |
532 (compose-hook-map [?B] #x0181) ;; CAPITAL B WITH HOOK | |
533 (compose-hook-map [?C] #x0187) ;; CAPITAL C WITH HOOK | |
534 (compose-hook-map [?D] #x018A) ;; CAPITAL D WITH HOOK | |
535 (compose-hook-map [?F] #x0191) ;; CAPITAL F WITH HOOK | |
536 (compose-hook-map [?G] #x0193) ;; CAPITAL G WITH HOOK | |
537 (compose-hook-map [?K] #x0198) ;; CAPITAL K WITH HOOK | |
538 (compose-hook-map [?P] #x01A4) ;; CAPITAL P WITH HOOK | |
539 (compose-hook-map [?T] #x01AC) ;; CAPITAL T WITH HOOK | |
540 (compose-hook-map [?V] #x01B2) ;; CAPITAL V WITH HOOK | |
541 (compose-hook-map [?Y] #x01B3) ;; CAPITAL Y WITH HOOK | |
542 (compose-hook-map [?Z] #x0224) ;; CAPITAL Z WITH HOOK | |
543 (compose-hook-map [U0262] #x029B) ;; SMALL CAPITAL G WITH HOOK | |
544 (compose-hook-map [?b] #x0253) ;; SMALL B WITH HOOK | |
545 (compose-hook-map [?c] #x0188) ;; SMALL C WITH HOOK | |
546 (compose-hook-map [?d] #x0257) ;; SMALL D WITH HOOK | |
547 (compose-hook-map [?f] #x0192) ;; SMALL F WITH HOOK | |
548 (compose-hook-map [?g] #x0260) ;; SMALL G WITH HOOK | |
549 (compose-hook-map [?h] #x0266) ;; SMALL H WITH HOOK | |
550 (compose-hook-map [U0266] #x0267) ;; SMALL HENG WITH HOOK | |
551 (compose-hook-map [?k] #x0199) ;; SMALL K WITH HOOK | |
552 (compose-hook-map [?m] #x0271) ;; SMALL M WITH HOOK | |
553 (compose-hook-map [?p] #x01A5) ;; SMALL P WITH HOOK | |
554 (compose-hook-map [?q] #x02A0) ;; SMALL Q WITH HOOK | |
555 (compose-hook-map [U025C] #x025D) ;; SMALL REVERSED OPEN E WITH HOOK | |
556 (compose-hook-map [?s] #x0282) ;; SMALL S WITH HOOK | |
557 (compose-hook-map [U0259] #x025A) ;; SMALL SCHWA WITH HOOK | |
558 (compose-hook-map [?t] #x01AD) ;; SMALL T WITH HOOK | |
559 (compose-hook-map [U0279] #x027B) ;; SMALL TURNED R WITH HOOK | |
560 (compose-hook-map [?v] #x028B) ;; SMALL V WITH HOOK | |
561 (compose-hook-map [?y] #x01B4) ;; SMALL Y WITH HOOK | |
562 (compose-hook-map [?z] #x0225) ;; SMALL Z WITH HOOK | |
563 (compose-horn-map [space] #x031b) | |
564 (compose-horn-map [?O] #x01A0) ;; CAPITAL O WITH HORN | |
565 (compose-horn-map [?U] #x01AF) ;; CAPITAL U WITH HORN | |
566 (compose-horn-map [?o] #x01A1) ;; SMALL O WITH HORN | |
567 (compose-horn-map [?u] #x01B0))) ;; SMALL U WITH HORN | |
272 | 568 |
273 | 569 |
274 ;;; The rest of the compose-map. These are the composed characters | 570 ;;; The rest of the compose-map. These are the composed characters |
275 ;;; that are not accessible via "dead" keys. | 571 ;;; that are not accessible via "dead" keys. |
276 | 572 |
530 (define-key compose-map "|C" [(?\242)]) | 826 (define-key compose-map "|C" [(?\242)]) |
531 (define-key compose-map "|c" [(?\242)]) | 827 (define-key compose-map "|c" [(?\242)]) |
532 (define-key compose-map "||" [(?\246)]) | 828 (define-key compose-map "||" [(?\246)]) |
533 | 829 |
534 | 830 |
535 ;; [[ Suppose we type these three physical keys: [Multi_key " a] | 831 ;; Make colon equivalent to doublequote for diaeresis processing. Some |
536 ;; Xlib can deliver these keys as the following sequences of keysyms: | 832 ;; Xlibs do this. |
537 ;; | 833 (flet ((alias-colon-to-doublequote (keymap) |
538 ;; - [Multi_key " a] (no surprise here) | 834 (map-keymap |
539 ;; - [adiaeresis] (OK, Xlib is doing compose processing for us) | 835 #'(lambda (key value) |
540 ;; - [Multi_key " adiaeresis] (Huh?) | 836 (when (keymapp value) |
541 ;; | 837 (alias-colon-to-doublequote value)) |
542 ;; It is the last possibility that is arguably a bug. Xlib can't | 838 (when (eq key '\") |
543 ;; decide whether it's really doing compose processing or not (or | 839 (define-key keymap ":" value))) |
544 ;; actually, different parts of Xlib disagree). | 840 keymap))) |
545 ;; | 841 (alias-colon-to-doublequote compose-map)) |
546 ;; So we'll just convert [Multi_key " adiaeresis] to [adiaeresis] ]] | |
547 | |
548 (eval-when-compile | |
549 (when nil ;; Commenting out. | |
550 | |
551 ;; This _used_ to work with our X11-oriented keysyms above. With them | |
552 ;; gone, it won't. The X11 bug it works around should be long dead. (Ha! | |
553 ;; Wasn't it cockroaches that would have ruled the planet after World | |
554 ;; War III?) | |
555 | |
556 (defun xlib-input-method-bug-workaround (keymap) | |
557 (map-keymap | |
558 (lambda (key value) | |
559 (cond | |
560 ((keymapp value) | |
561 (xlib-input-method-bug-workaround value)) | |
562 ((and (sequencep value) | |
563 (eq 1 (length value)) | |
564 (null (lookup-key keymap value))) | |
565 (define-key keymap value value)))) | |
566 keymap)) | |
567 (xlib-input-method-bug-workaround compose-map) | |
568 (unintern 'xlib-input-method-bug-workaround))) | |
569 | |
570 ;; While we're at it, a similar mechanism will make colon equivalent | |
571 ;; to doublequote for diaeresis processing. Some Xlibs do this. | |
572 (defun alias-colon-to-doublequote (keymap) | |
573 (map-keymap | |
574 (lambda (key value) | |
575 (when (keymapp value) | |
576 (alias-colon-to-doublequote value)) | |
577 (when (eq key '\") | |
578 (define-key keymap ":" value))) | |
579 keymap)) | |
580 (alias-colon-to-doublequote compose-map) | |
581 (unintern 'alias-colon-to-doublequote) | |
582 | 842 |
583 ;;; Electric dead keys: making a' mean a-acute. | 843 ;;; Electric dead keys: making a' mean a-acute. |
584 | 844 |
585 | 845 |
586 (defun electric-diacritic (&optional count) | 846 (defun electric-diacritic (&optional count) |
587 "Modify the previous character with an accent. | 847 "Modify the previous character with an accent. |
588 For example, if `:' is bound to this command, then typing `a:' | 848 For example, if `:' is bound to this command, then typing `a:' |
589 will first insert `a' and then turn it into `\344' (adiaeresis). | 849 will first insert `a' and then turn it into `\344' (adiaeresis). |
590 The keys to which this command may be bound (and the accents | 850 The minimum list of keys to which this command may be bound (and the accents |
591 which it understands) are: | 851 which it understands) are: |
592 | 852 |
593 ' (acute) \301\311\315\323\332\335 \341\351\355\363\372\375 | 853 ' (acute) \301\311\315\323\332\335 \341\351\355\363\372\375 |
594 ` (grave) \300\310\314\322\331 \340\350\354\362\371 | 854 ` (grave) \300\310\314\322\331 \340\350\354\362\371 |
595 : (diaeresis) \304\313\317\326\334 \344\353\357\366\374\377 | 855 : (diaeresis) \304\313\317\326\334 \344\353\357\366\374\377 |
619 (t (error "unknown diacritic: %s (%c)" c c)))) | 879 (t (error "unknown diacritic: %s (%c)" c c)))) |
620 (base-char (preceding-char)) | 880 (base-char (preceding-char)) |
621 (mod-char (and (>= (downcase base-char) ?a) ; only do alphabetics? | 881 (mod-char (and (>= (downcase base-char) ?a) ; only do alphabetics? |
622 (<= (downcase base-char) ?z) | 882 (<= (downcase base-char) ?z) |
623 (lookup-key map (make-string 1 base-char))))) | 883 (lookup-key map (make-string 1 base-char))))) |
624 (if (and (vectorp mod-char) (= (length mod-char) 1)) | 884 (when (and (vectorp mod-char) (= (length mod-char) 1)) |
625 (setq mod-char (aref mod-char 0))) | 885 (setq mod-char (aref mod-char 0)) |
886 (if (and (consp mod-char) (= (length mod-char) 1) | |
887 (characterp (car mod-char))) | |
888 (setq mod-char (car mod-char)))) | |
626 (if (and mod-char (symbolp mod-char)) | 889 (if (and mod-char (symbolp mod-char)) |
627 (setq mod-char (or (get mod-char 'character-of-keysym) mod-char))) | 890 (setq mod-char (or (get-character-of-keysym mod-char) mod-char))) |
628 (if (and mod-char (> count 0)) | 891 (if (and mod-char (> count 0)) |
629 (delete-char -1) | 892 (delete-char -1) |
630 (setq mod-char c)) | 893 (setq mod-char c)) |
631 (while (> count 0) | 894 (while (> count 0) |
632 (insert mod-char) | 895 (insert mod-char) |
656 ;; (?e "\346") ;; ae-ligature (Norwegian and Danish) | 919 ;; (?e "\346") ;; ae-ligature (Norwegian and Danish) |
657 ;; (?o "\370") | 920 ;; (?o "\370") |
658 ;; (? "/")) ; no special code | 921 ;; (? "/")) ; no special code |
659 | 922 |
660 | 923 |
661 ;;; Providing help in the middle of a compose sequence. (Way cool.) | |
662 | |
663 (eval-when-compile | |
664 (defsubst next-composable-event () | |
665 (let (event) | |
666 (while (progn | |
667 (setq event (next-command-event)) | |
668 (not (or (key-press-event-p event) | |
669 (button-press-event-p event)))) | |
670 (dispatch-event event)) | |
671 event))) | |
672 | |
673 (defun compose-help (ignore-prompt) | |
674 (let* ((keys (apply 'vector (nbutlast (append (this-command-keys) nil)))) | |
675 (map (or (lookup-key function-key-map keys) | |
676 (error "can't find map? %s %s" keys (this-command-keys)))) | |
677 binding) | |
678 (save-excursion | |
679 (with-output-to-temp-buffer "*Help*" | |
680 (set-buffer "*Help*") | |
681 (erase-buffer) | |
682 (message "Working...") | |
683 (setq ctl-arrow 'compose) ; non-t-non-nil | |
684 (insert "You are typing a compose sequence. So far you have typed: ") | |
685 (insert (key-description keys)) | |
686 (insert "\nCompletions from here are:\n\n") | |
687 (map-keymap 'compose-help-mapper map t) | |
688 (message "? "))) | |
689 (while (keymapp map) | |
690 (setq binding (lookup-key map (vector (next-composable-event)))) | |
691 (if (null binding) | |
692 (message "No such key in keymap. Try again.") | |
693 (setq map binding))) | |
694 binding)) | |
695 | |
696 (put 'compose-help 'isearch-command t) ; so that it doesn't terminate isearch | |
697 | |
698 (defun compose-help-mapper (key binding) | |
699 (if (and (symbolp key) | |
700 (get key 'character-of-keysym)) | |
701 (setq key (get key 'character-of-keysym))) | |
702 (if (eq binding 'compose-help) ; suppress that... | |
703 nil | |
704 (if (keymapp binding) | |
705 (let ((p (point))) | |
706 (map-keymap 'compose-help-mapper binding t) | |
707 (goto-char p) | |
708 (while (not (eobp)) | |
709 (if (characterp key) | |
710 (insert (make-string 1 key)) | |
711 (insert (single-key-description key))) | |
712 (insert " ") | |
713 (forward-line 1))) | |
714 (if (characterp key) | |
715 (insert (make-string 1 key)) | |
716 (insert (single-key-description key))) | |
717 (indent-to 16) | |
718 (let ((code (and (vectorp binding) | |
719 (= 1 (length binding)) | |
720 (get (aref binding 0) 'character-of-keysym)))) | |
721 (if code | |
722 (insert (make-string 1 code)) | |
723 (if (stringp binding) | |
724 (insert binding) | |
725 (insert (prin1-to-string binding))))) | |
726 (when (and (vectorp binding) (= 1 (length binding))) | |
727 (indent-to 32) | |
728 (insert (symbol-name (aref binding 0))))) | |
729 (insert "\n"))) | |
730 | |
731 ;; define it at top-level in the compose map... | |
732 ;;(define-key compose-map [(control h)] 'compose-help) | |
733 ;;(define-key compose-map [help] 'compose-help) | |
734 ;; and then define it in each sub-map of the compose map. | |
735 (map-keymap | |
736 (lambda (key binding) | |
737 (when (keymapp binding) | |
738 ;; (define-key binding [(control h)] 'compose-help) | |
739 ;; (define-key binding [help] 'compose-help) | |
740 )) | |
741 compose-map nil) | |
742 | |
743 ;; Make redisplay display the accented letters | |
744 (if (memq (default-value 'ctl-arrow) '(t nil)) | |
745 (setq-default ctl-arrow 'iso-8859/1)) | |
746 | |
747 | |
748 (provide 'x-compose) | 924 (provide 'x-compose) |
749 | 925 |
750 ;;; x-compose.el ends here | 926 ;;; x-compose.el ends here |