comparison lisp/iso/iso-acc.el @ 144:318232e2a3f0 r20-2b6

Import from CVS: tag r20-2b6
author cvs
date Mon, 13 Aug 2007 09:34:14 +0200
parents 1040fe1366ac
children 25f70ba0133c
comparison
equal deleted inserted replaced
143:50e7fedfe353 144:318232e2a3f0
4 4
5 ;; Author: Johan Vromans <jv@mh.nl> 5 ;; Author: Johan Vromans <jv@mh.nl>
6 ;; Maintainer: Alexandre Oliva <oliva@dcc.unicamp.br> 6 ;; Maintainer: Alexandre Oliva <oliva@dcc.unicamp.br>
7 ;; Keywords: i18n 7 ;; Keywords: i18n
8 ;; Adapted to XEmacs 19.14 by Alexandre Oliva <oliva@dcc.unicamp.br> 8 ;; Adapted to XEmacs 19.14 by Alexandre Oliva <oliva@dcc.unicamp.br>
9 ;; $Revision: 1.3 $ 9 ;; $Revision: 1.4 $
10 ;; $Date: 1997/02/06 02:08:34 $ 10 ;; $Date: 1997/05/10 23:20:58 $
11 11
12 ;; This file is part of GNU Emacs. 12 ;; This file is part of GNU Emacs.
13 13
14 ;; GNU Emacs is free software; you can redistribute it and/or modify 14 ;; GNU Emacs is free software; you can redistribute it and/or modify
15 ;; it under the terms of the GNU General Public License as published by 15 ;; it under the terms of the GNU General Public License as published by
68 ;;; Code: 68 ;;; Code:
69 69
70 (provide 'iso-acc) 70 (provide 'iso-acc)
71 71
72 ;; needed for compatibility with XEmacs 19.14 72 ;; needed for compatibility with XEmacs 19.14
73 (if (fboundp 'read-event) () 73 (if (fboundp 'read-event)
74 (defun read-event () (event-key (next-command-event)))) 74 (defalias 'iso-read-event 'read-event)
75 (defun iso-read-event ()
76 (event-key (next-command-event))))
75 77
76 (if (fboundp 'character-to-event) 78 (if (fboundp 'character-to-event)
77 (defun iso-char-to-event (ch) 79 (defun iso-char-to-event (ch)
78 "returns an event containing the given character" 80 "returns an event containing the given character"
79 (character-to-event (list ch))) 81 (character-to-event (list ch)))
146 (?\ . ?^) (space . \^)) 148 (?\ . ?^) (space . \^))
147 (?` (?A . ?\300) (?E . ?\310) (?I . ?\314) (?O . ?\322) 149 (?` (?A . ?\300) (?E . ?\310) (?I . ?\314) (?O . ?\322)
148 (?U . ?\331) (?a . ?\340) (?e . ?\350) (?i . ?\354) 150 (?U . ?\331) (?a . ?\340) (?e . ?\350) (?i . ?\354)
149 (?o . ?\362) (?u . ?\371) (?\ . ?`) (space . ?`))) 151 (?o . ?\362) (?u . ?\371) (?\ . ?`) (space . ?`)))
150 152
153 ;;; Thanks to Tudor <tudor@cs.unh.edu> for some fixes and additions.
151 ("latin-2" 154 ("latin-2"
152 (?' (?A . ?\301) (?C . ?\306) (?D . ?\320) (?E . ?\311) (?I . ?\315) 155 (?' (?A . ?\301) (?C . ?\306) (?D . ?\320) (?E . ?\311) (?I . ?\315)
153 (?L . ?\305) (?N . ?\321) (?O . ?\323) (?R . ?\300) (?S . ?\246) 156 (?L . ?\305) (?N . ?\321) (?O . ?\323) (?R . ?\300) (?S . ?\246)
154 (?U . ?\332) (?Y . ?\335) (?Z . ?\254) (?a . ?\341) (?c . ?\346) 157 (?U . ?\332) (?Y . ?\335) (?Z . ?\254) (?a . ?\341) (?c . ?\346)
155 (?d . ?\360) (?e . ?\351) (?i . ?\355) (?l . ?\345) (?n . ?\361) 158 (?d . ?\360) (?e . ?\351) (?i . ?\355) (?l . ?\345) (?n . ?\361)
157 (?z . ?\274) (?' . ?\264) (?\ . ?') (space . ?')) 160 (?z . ?\274) (?' . ?\264) (?\ . ?') (space . ?'))
158 (?` (?A . ?\241) (?C . ?\307) (?E . ?\312) (?L . ?\243) (?S . ?\252) 161 (?` (?A . ?\241) (?C . ?\307) (?E . ?\312) (?L . ?\243) (?S . ?\252)
159 (?T . ?\336) (?Z . ?\257) (?a . ?\261) (?l . ?\263) (?c . ?\347) 162 (?T . ?\336) (?Z . ?\257) (?a . ?\261) (?l . ?\263) (?c . ?\347)
160 (?e . ?\352) (?s . ?\272) (?t . ?\376) (?z . ?\277) (?` . ?\252) 163 (?e . ?\352) (?s . ?\272) (?t . ?\376) (?z . ?\277) (?` . ?\252)
161 (?. . ?\377) (?\ . ?`) (space . ?`)) 164 (?. . ?\377) (?\ . ?`) (space . ?`))
162 (?^ (?A . ?\302) (?O . ?\324) (?a . ?\342) (?o . ?\364) 165 (?^ (?A . ?\302) (?I . ?\316) (?O . ?\324)
166 (?a . ?\342) (?i . ?\356) (?o . ?\364)
163 (?^ . ?^) ; no special code? 167 (?^ . ?^) ; no special code?
164 (?\ . ?^) (space . ?^)) 168 (?\ . ?^) (space . ?^))
165 (?\" (?A . ?\304) (?E . ?\313) (?O . ?\326) (?U . ?\334) (?a . ?\344) 169 (?\" (?A . ?\304) (?E . ?\313) (?O . ?\326) (?U . ?\334) (?a . ?\344)
166 (?e . ?\353) (?o . ?\366) (?s . ?\337) (?u . ?\374) (?\" . ?\250) 170 (?e . ?\353) (?o . ?\366) (?s . ?\337) (?u . ?\374) (?\" . ?\250)
167 (?\ . ?\") (space . ?\")) 171 (?\ . ?\") (space . ?\"))
168 (?\~ (?A . ?\303) (?C . ?\310) (?D . ?\317) (?L . ?\245) (?N . ?\322) 172 (?\~ (?A . ?\303) (?C . ?\310) (?D . ?\317) (?L . ?\245) (?N . ?\322)
169 (?O . ?\325) (?R . ?\330) (?S . ?\251) (?T . ?\253) (?U . ?\333) 173 (?O . ?\325) (?R . ?\330) (?S . ?\251) (?T . ?\253) (?U . ?\333)
170 (?Z . ?\256) (?a . ?\323) (?c . ?\350) (?d . ?\357) (?l . ?\265) 174 (?Z . ?\256) (?a . ?\343) (?c . ?\350) (?d . ?\357) (?l . ?\265)
171 (?n . ?\362) (?o . ?\365) (?r . ?\370) (?s . ?\271) (?t . ?\273) 175 (?n . ?\362) (?o . ?\365) (?r . ?\370) (?s . ?\271) (?t . ?\273)
172 (?u . ?\373) (?z . ?\276) 176 (?u . ?\373) (?z . ?\276)
173 (?v . ?\242) ; v accent 177 (?v . ?\242) ; v accent
174 (?\~ . ?\242) ; v accent 178 (?\~ . ?\242) ; v accent
175 (?\. . ?\270) ; cedilla accent 179 (?\. . ?\270) ; cedilla accent
255 this-command) 259 this-command)
256 (progn 260 (progn
257 (message "%s%c" 261 (message "%s%c"
258 (or prompt "Compose with ") 262 (or prompt "Compose with ")
259 first-char) 263 first-char)
260 (read-event)) 264 (iso-read-event))
261 (insert first-char) 265 (insert first-char)
262 (prog1 (read-event) 266 (prog1 (iso-read-event)
263 (delete-region (1- (point)) (point))))) 267 (delete-region (1- (point)) (point)))))
264 (entry (cdr (assq second-char list)))) 268 (entry (cdr (assq second-char list))))
265 (if entry 269 (if entry
266 ;; Found it: return the mapped char 270 ;; Found it: return the mapped char
267 (vector (iso-char-to-event entry)) 271 (vector (iso-char-to-event entry))