4
|
1 ;;; iso-acc.el --- minor mode providing electric accent keys
|
|
2
|
|
3 ;; Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
|
|
4
|
|
5 ;; Author: Johan Vromans <jv@mh.nl>
|
94
|
6 ;; Maintainer: Alexandre Oliva <oliva@dcc.unicamp.br>
|
4
|
7 ;; Keywords: i18n
|
88
|
8 ;; Adapted to XEmacs 19.14 by Alexandre Oliva <oliva@dcc.unicamp.br>
|
144
|
9 ;; $Revision: 1.4 $
|
|
10 ;; $Date: 1997/05/10 23:20:58 $
|
4
|
11
|
|
12 ;; This file is part of GNU Emacs.
|
|
13
|
|
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
|
|
16 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
17 ;; any later version.
|
|
18
|
|
19 ;; GNU Emacs is distributed in the hope that it will be useful,
|
|
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
22 ;; GNU General Public License for more details.
|
|
23
|
|
24 ;; You should have received a copy of the GNU General Public License
|
|
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the
|
|
26 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
27 ;; Boston, MA 02111-1307, USA.
|
|
28
|
|
29 ;;; Commentary:
|
|
30
|
|
31 ;; Function `iso-accents-mode' activates a minor mode in which
|
|
32 ;; typewriter "dead keys" are emulated. The purpose of this emulation
|
|
33 ;; is to provide a simple means for inserting accented characters
|
|
34 ;; according to the ISO-8859-1 character set.
|
|
35 ;;
|
|
36 ;; In `iso-accents-mode', pseudo accent characters are used to
|
|
37 ;; introduce accented keys. The pseudo-accent characters are:
|
|
38 ;;
|
|
39 ;; ' (minute) -> grave accent
|
|
40 ;; ` (backtick) -> acute accent
|
|
41 ;; " (second) -> diaeresis
|
|
42 ;; ^ (caret) -> circumflex
|
|
43 ;; ~ (tilde) -> tilde over the character
|
94
|
44 ;; / (slash) -> slash through the character
|
|
45 ;; . (dot) -> dot over the character
|
|
46 ;; , (cedilla) -> cedilla under the character (except on default mode)
|
|
47 ;; Also: /A is A-with-ring and /E is AE ligature.
|
4
|
48 ;;
|
|
49 ;; The action taken depends on the key that follows the pseudo accent.
|
|
50 ;; In general:
|
|
51 ;;
|
|
52 ;; pseudo-accent + appropriate letter -> accented letter
|
94
|
53 ;; pseudo-accent + space -> pseudo-accent (except comma)
|
4
|
54 ;; pseudo-accent + pseudo-accent -> accent (if available)
|
|
55 ;; pseudo-accent + other -> pseudo-accent + other
|
|
56 ;;
|
|
57 ;; If the pseudo-accent is followed by anything else than a
|
|
58 ;; self-insert-command, the dead-key code is terminated, the
|
|
59 ;; pseudo-accent inserted 'as is' and the bell is rung to signal this.
|
|
60 ;;
|
|
61 ;; Function `iso-accents-mode' can be used to enable the iso accents
|
|
62 ;; minor mode, or disable it.
|
|
63
|
|
64 ;; If you want only some of these characters to serve as accents,
|
|
65 ;; add a language to `iso-languages' which specifies the accent characters
|
|
66 ;; that you want, then select the language with `iso-accents-customize'.
|
|
67
|
|
68 ;;; Code:
|
|
69
|
|
70 (provide 'iso-acc)
|
|
71
|
|
72 ;; needed for compatibility with XEmacs 19.14
|
144
|
73 (if (fboundp 'read-event)
|
|
74 (defalias 'iso-read-event 'read-event)
|
|
75 (defun iso-read-event ()
|
|
76 (event-key (next-command-event))))
|
4
|
77
|
94
|
78 (if (fboundp 'character-to-event)
|
|
79 (defun iso-char-to-event (ch)
|
|
80 "returns an event containing the given character"
|
|
81 (character-to-event (list ch)))
|
|
82 (defun iso-char-to-event (ch)
|
|
83 "returns the character itself"
|
|
84 ch))
|
4
|
85
|
|
86 ;; needed for compatibility with XEmacs 19.14 and GNU Emacs 19.30
|
|
87 (if (fboundp 'this-single-command-keys) ()
|
|
88 (if (string-match "Lucid" (version))
|
|
89 (defun this-single-command-keys ()
|
|
90 (setq this-command (not (this-command-keys)))
|
|
91 (this-command-keys))
|
|
92 (defun this-single-command-keys () (this-command-keys))))
|
|
93
|
94
|
94 ;; end of compatibility modules
|
|
95
|
4
|
96 (defvar iso-languages
|
|
97 '(("portuguese"
|
|
98 (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332)
|
|
99 (?C . ?\307) (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363)
|
|
100 (?u . ?\372) (?c . ?\347) (?\ . ?') (space . ?'))
|
|
101 (?` (?A . ?\300) (?a . ?\340) (?\ . ?`) (space . ?`))
|
|
102 (?^ (?A . ?\302) (?E . ?\312) (?O . ?\324) (?a . ?\342) (?e . ?\352)
|
|
103 (?o . ?\364) (?\ . ?^) (space . ?^))
|
|
104 (?\" (?U . ?\334) (?u . ?\374) (?\ . ?\") (space . ?\"))
|
94
|
105 (?\~ (?A . ?\303) (?O . ?\325) (?a . ?\343) (?o . ?\365) (?\ . ?\~)
|
|
106 (space . ?\~))
|
4
|
107 (?, (?c . ?\347) (?C . ?\307)))
|
|
108
|
|
109 ("irish"
|
|
110 (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332)
|
|
111 (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) (?u . ?\372)
|
|
112 (?\ . ?') (space . ?')))
|
|
113
|
|
114 ("french"
|
94
|
115 (?' (?E . ?\311) (?C . ?\307) (?e . ?\351) (?c . ?\347) (?\ . ?')
|
|
116 (space . ?'))
|
|
117 (?` (?A . ?\300) (?E . ?\310) (?a . ?\340) (?e . ?\350) (?\ . ?`)
|
|
118 (space . ?`))
|
4
|
119 (?^ (?A . ?\302) (?E . ?\312) (?I . ?\316) (?O . ?\324) (?U . ?\333)
|
|
120 (?a . ?\342) (?e . ?\352) (?i . ?\356) (?o . ?\364) (?u . ?\373)
|
|
121 (?\ . ?^) (space . ?^))
|
94
|
122 (?\" (?E . ?\313) (?I . ?\317)
|
|
123 (?e . ?\353) (?i . ?\357) (?\ . ?\") (space . ?\"))
|
|
124 (?\~ (?< . ?\253) (?> . ?\273) (?C . ?\307) (?c . ?\347) (?\ . ?\~)
|
|
125 (space . ?\~))
|
4
|
126 (?, (?c . ?\347) (?C . ?\307)))
|
|
127
|
94
|
128 ;;; ISO-8859-3, developed by D. Dale Gulledge <ddg@cci.com>
|
|
129 ("latin-3"
|
|
130 (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323)
|
|
131 (?U . ?\332) (?a . ?\341) (?e . ?\351) (?i . ?\355)
|
|
132 (?o . ?\363) (?u . ?\372) (?\ . ?') (space . ?'))
|
|
133 (?. (?C . ?\305) (?G . ?\325) (?I . ?\251) (?Z . ?\257)
|
|
134 (?c . ?\345) (?g . ?\365) (?z . ?\277))
|
|
135 (?\" (?A . ?\304) (?E . ?\313) (?I . ?\317) (?O . ?\326)
|
|
136 (?U . ?\334) (?a . ?\344) (?e . ?\353) (?i . ?\357)
|
|
137 (?o ?\366) (?u ?\374) (?\ . ?\") (space . ?\"))
|
|
138 (?\/ (?\/ . ?\260) (?\ . ?/) (space . ?/))
|
|
139 (?\~ (?C . ?\307) (?G . ?\253) (?N . ?\321) (?S . ?\252)
|
|
140 (?U . ?\335) (?\~ . ?\270) (?c . ?\347) (?g . ?\273)
|
|
141 (?h . ?\261) (?n . ?\361) (?u . ?\375)
|
|
142 (?\ . ?~) (space . ?~))
|
|
143 (?^ (?A . ?\302) (?C . ?\306) (?E . ?\312) (?G . ?\330)
|
|
144 (?H . ?\246) (?I . ?\316) (?J . ?\254) (?O . ?\324)
|
|
145 (?S . ?\336) (?U . ?\333) (?a . ?\342) (?c . ?\346)
|
|
146 (?e . ?\352) (?g . ?\370) (?h . ?\266) (?i . ?\356)
|
|
147 (?j . ?\274) (?o . ?\364) (?s . ?\376) (?u . ?\373)
|
|
148 (?\ . ?^) (space . \^))
|
|
149 (?` (?A . ?\300) (?E . ?\310) (?I . ?\314) (?O . ?\322)
|
|
150 (?U . ?\331) (?a . ?\340) (?e . ?\350) (?i . ?\354)
|
|
151 (?o . ?\362) (?u . ?\371) (?\ . ?`) (space . ?`)))
|
|
152
|
144
|
153 ;;; Thanks to Tudor <tudor@cs.unh.edu> for some fixes and additions.
|
4
|
154 ("latin-2"
|
|
155 (?' (?A . ?\301) (?C . ?\306) (?D . ?\320) (?E . ?\311) (?I . ?\315)
|
|
156 (?L . ?\305) (?N . ?\321) (?O . ?\323) (?R . ?\300) (?S . ?\246)
|
|
157 (?U . ?\332) (?Y . ?\335) (?Z . ?\254) (?a . ?\341) (?c . ?\346)
|
|
158 (?d . ?\360) (?e . ?\351) (?i . ?\355) (?l . ?\345) (?n . ?\361)
|
|
159 (?o . ?\363) (?r . ?\340) (?s . ?\266) (?u . ?\372) (?y . ?\375)
|
|
160 (?z . ?\274) (?' . ?\264) (?\ . ?') (space . ?'))
|
|
161 (?` (?A . ?\241) (?C . ?\307) (?E . ?\312) (?L . ?\243) (?S . ?\252)
|
|
162 (?T . ?\336) (?Z . ?\257) (?a . ?\261) (?l . ?\263) (?c . ?\347)
|
|
163 (?e . ?\352) (?s . ?\272) (?t . ?\376) (?z . ?\277) (?` . ?\252)
|
|
164 (?. . ?\377) (?\ . ?`) (space . ?`))
|
144
|
165 (?^ (?A . ?\302) (?I . ?\316) (?O . ?\324)
|
|
166 (?a . ?\342) (?i . ?\356) (?o . ?\364)
|
4
|
167 (?^ . ?^) ; no special code?
|
|
168 (?\ . ?^) (space . ?^))
|
|
169 (?\" (?A . ?\304) (?E . ?\313) (?O . ?\326) (?U . ?\334) (?a . ?\344)
|
|
170 (?e . ?\353) (?o . ?\366) (?s . ?\337) (?u . ?\374) (?\" . ?\250)
|
|
171 (?\ . ?\") (space . ?\"))
|
|
172 (?\~ (?A . ?\303) (?C . ?\310) (?D . ?\317) (?L . ?\245) (?N . ?\322)
|
|
173 (?O . ?\325) (?R . ?\330) (?S . ?\251) (?T . ?\253) (?U . ?\333)
|
144
|
174 (?Z . ?\256) (?a . ?\343) (?c . ?\350) (?d . ?\357) (?l . ?\265)
|
4
|
175 (?n . ?\362) (?o . ?\365) (?r . ?\370) (?s . ?\271) (?t . ?\273)
|
|
176 (?u . ?\373) (?z . ?\276)
|
|
177 (?v . ?\242) ; v accent
|
|
178 (?\~ . ?\242) ; v accent
|
|
179 (?\. . ?\270) ; cedilla accent
|
|
180 (?\ . ?\~) (space . ?\~)))
|
|
181
|
|
182 ("latin-1"
|
|
183 (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332)
|
|
184 (?Y . ?\335) (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363)
|
|
185 (?u . ?\372) (?y . ?\375) (?' . ?\264) (?\ . ?') (space . ?'))
|
|
186 (?` (?A . ?\300) (?E . ?\310) (?I . ?\314) (?O . ?\322) (?U . ?\331)
|
|
187 (?a . ?\340) (?e . ?\350) (?i . ?\354) (?o . ?\362) (?u . ?\371)
|
|
188 (?` . ?`) (?\ . ?`) (space . ?`))
|
|
189 (?^ (?A . ?\302) (?E . ?\312) (?I . ?\316) (?O . ?\324) (?U . ?\333)
|
|
190 (?a . ?\342) (?e . ?\352) (?i . ?\356) (?o . ?\364) (?u . ?\373)
|
|
191 (?^ . ?^) (?\ . ?^) (space . ?^))
|
|
192 (?\" (?A . ?\304) (?E . ?\313) (?I . ?\317) (?O . ?\326) (?U . ?\334)
|
|
193 (?a . ?\344) (?e . ?\353) (?i . ?\357) (?o . ?\366) (?s . ?\337)
|
|
194 (?u . ?\374) (?y . ?\377) (?\" . ?\250) (?\ . ?\") (space . ?\"))
|
|
195 (?\~ (?A . ?\303) (?C . ?\307) (?D . ?\320) (?N . ?\321) (?O . ?\325)
|
|
196 (?T . ?\336) (?a . ?\343) (?c . ?\347) (?d . ?\360) (?n . ?\361)
|
|
197 (?o . ?\365) (?t . ?\376) (?> . ?\273) (?< . ?\253) (?\~ . ?\270)
|
|
198 (?! . ?\241) (?? . ?\277)
|
|
199 (?\ . ?\~) (space . ?\~))
|
|
200 (?\/ (?A . ?\305) (?E . ?\306) (?O . ?\330) (?a . ?\345) (?e . ?\346)
|
|
201 (?o . ?\370) (?\/ . ?\260) (?\ . ?\/) (space . ?\/))))
|
|
202 "List of language-specific customizations for the ISO Accents mode.
|
|
203
|
|
204 Each element of the list is of the form
|
|
205
|
|
206 (LANGUAGE
|
|
207 (PSEUDO-ACCENT MAPPINGS)
|
|
208 (PSEUDO-ACCENT MAPPINGS)
|
|
209 ...)
|
|
210
|
|
211 LANGUAGE is a string naming the language.
|
|
212 PSEUDO-ACCENT is a char specifying an accent key.
|
|
213 MAPPINGS are cons cells of the form (CHAR . ISO-CHAR).
|
|
214
|
|
215 The net effect is that the key sequence PSEUDO-ACCENT CHAR is mapped
|
|
216 to ISO-CHAR on input.")
|
|
217
|
|
218 (defvar iso-language nil
|
|
219 "Language for which ISO Accents mode is currently customized.
|
|
220 Change it with the `iso-accents-customize' function.")
|
|
221
|
|
222 (defvar iso-accents-list nil
|
|
223 "Association list for ISO accent combinations, for the chosen language.")
|
|
224
|
|
225 (defvar iso-accents-mode nil
|
|
226 "*Non-nil enables ISO Accents mode.
|
|
227 Setting this variable makes it local to the current buffer.
|
|
228 See the function `iso-accents-mode'.")
|
|
229 (make-variable-buffer-local 'iso-accents-mode)
|
|
230
|
94
|
231 (defvar iso-accents-enable '(?' ?` ?^ ?\" ?~ ?/ ?, ?.)
|
4
|
232 "*List of accent keys that become prefixes in ISO Accents mode.
|
94
|
233 The default is (?' ?` ?^ ?\" ?~ ?/ ?, ?.), which contains all the supported
|
4
|
234 accent keys. If you set this variable to a list in which some of those
|
|
235 characters are missing, the missing ones do not act as accents.
|
|
236
|
|
237 Note that if you specify a language with `iso-accents-customize',
|
|
238 that can also turn off certain prefixes (whichever ones are not needed in
|
|
239 the language you choose).")
|
|
240
|
|
241 (defun iso-accents-accent-key (prompt)
|
|
242 "Modify the following character by adding an accent to it."
|
|
243 ;; Pick up the accent character.
|
|
244 (if (and iso-accents-mode
|
|
245 (memq last-input-char iso-accents-enable))
|
|
246 (iso-accents-compose prompt)
|
|
247 (char-to-string last-input-char)))
|
|
248
|
|
249 (defun iso-accents-compose (prompt)
|
|
250 (let* ((first-char last-input-char)
|
|
251 (list (assq first-char iso-accents-list))
|
|
252 ;; Wait for the second key and look up the combination.
|
|
253 (second-char (if (or prompt
|
|
254 (not (eq (key-binding "a")
|
|
255 'self-insert-command))
|
|
256 ;; Not at start of a key sequence.
|
|
257 (> (length (this-single-command-keys)) 1)
|
|
258 ;; Called from anything but the command loop.
|
|
259 this-command)
|
|
260 (progn
|
|
261 (message "%s%c"
|
|
262 (or prompt "Compose with ")
|
|
263 first-char)
|
144
|
264 (iso-read-event))
|
4
|
265 (insert first-char)
|
144
|
266 (prog1 (iso-read-event)
|
4
|
267 (delete-region (1- (point)) (point)))))
|
|
268 (entry (cdr (assq second-char list))))
|
|
269 (if entry
|
94
|
270 ;; Found it: return the mapped char
|
|
271 (vector (iso-char-to-event entry))
|
4
|
272 ;; Otherwise, advance and schedule the second key for execution.
|
94
|
273 (setq unread-command-events (cons (iso-char-to-event second-char)
|
|
274 unread-command-events))
|
|
275 (vector (iso-char-to-event first-char)))))
|
4
|
276
|
|
277 ;; It is a matter of taste if you want the minor mode indicated
|
|
278 ;; in the mode line...
|
|
279 ;; If so, uncomment the next four lines.
|
|
280 ;; (or (assq 'iso-accents-mode minor-mode-alist)
|
|
281 ;; (setq minor-mode-alist
|
|
282 ;; (append minor-mode-alist
|
|
283 ;; '((iso-accents-mode " ISO-Acc")))))
|
|
284
|
|
285 ;;;###autoload
|
|
286 (defun iso-accents-mode (&optional arg)
|
|
287 "Toggle ISO Accents mode, in which accents modify the following letter.
|
|
288 This permits easy insertion of accented characters according to ISO-8859-1.
|
|
289 When Iso-accents mode is enabled, accent character keys
|
|
290 \(`, ', \", ^, / and ~) do not self-insert; instead, they modify the following
|
|
291 letter key so that it inserts an ISO accented letter.
|
|
292
|
|
293 You can customize ISO Accents mode to a particular language
|
|
294 with the command `iso-accents-customize'.
|
|
295
|
|
296 Special combinations: ~c gives a c with cedilla,
|
|
297 ~d gives an Icelandic eth (d with dash).
|
|
298 ~t gives an Icelandic thorn.
|
|
299 \"s gives German sharp s.
|
|
300 /a gives a with ring.
|
|
301 /e gives an a-e ligature.
|
|
302 ~< and ~> give guillemots.
|
|
303 ~! gives an inverted exclamation mark.
|
|
304 ~? gives an inverted question mark.
|
|
305
|
|
306 With an argument, a positive argument enables ISO Accents mode,
|
|
307 and a negative argument disables it."
|
|
308
|
|
309 (interactive "P")
|
|
310
|
|
311 (if (if arg
|
|
312 ;; Negative arg means switch it off.
|
|
313 (<= (prefix-numeric-value arg) 0)
|
|
314 ;; No arg means toggle.
|
|
315 iso-accents-mode)
|
|
316 (setq iso-accents-mode nil)
|
|
317
|
|
318 ;; Enable electric accents.
|
|
319 (setq iso-accents-mode t)))
|
|
320
|
|
321 (defun iso-accents-customize (language)
|
|
322 "Customize the ISO accents machinery for a particular language.
|
|
323 It selects the customization based on the specifications in the
|
|
324 `iso-languages' variable."
|
|
325 (interactive (list (completing-read "Language: " iso-languages nil t)))
|
94
|
326 (let ((table (assoc language iso-languages))
|
|
327 tail)
|
4
|
328 (if (not table)
|
|
329 (error "Unknown language '%s'" language)
|
|
330 (setq iso-language language
|
|
331 iso-accents-list (cdr table))
|
|
332 (if key-translation-map
|
|
333 (substitute-key-definition
|
|
334 'iso-accents-accent-key nil key-translation-map)
|
|
335 (setq key-translation-map (make-sparse-keymap)))
|
|
336 ;; Set up translations for all the characters that are used as
|
|
337 ;; accent prefixes in this language.
|
|
338 (setq tail iso-accents-list)
|
|
339 (while tail
|
94
|
340 (define-key key-translation-map (vector (iso-char-to-event
|
|
341 (car (car tail))))
|
4
|
342 'iso-accents-accent-key)
|
|
343 (setq tail (cdr tail))))))
|
|
344
|
|
345 (defun iso-accentuate (start end)
|
|
346 "Convert two-character sequences in region into accented characters.
|
|
347 Noninteractively, this operates on text from START to END.
|
|
348 This uses the same conversion that ISO Accents mode uses for type-in."
|
|
349 (interactive "r")
|
|
350 (save-excursion
|
|
351 (save-restriction
|
|
352 (narrow-to-region start end)
|
|
353 (goto-char start)
|
|
354 (forward-char 1)
|
|
355 (let (entry)
|
|
356 (while (< (point) end)
|
|
357 (if (and (memq (preceding-char) iso-accents-enable)
|
|
358 (setq entry (cdr (assq (following-char) (assq (preceding-char) iso-accents-list)))))
|
|
359 (progn
|
|
360 (forward-char -1)
|
|
361 (delete-char 2)
|
|
362 (insert entry)
|
|
363 (setq end (1- end)))
|
|
364 (forward-char 1)))))))
|
|
365
|
|
366 (defun iso-accent-rassoc-unit (value alist)
|
|
367 (let (elt acc)
|
|
368 (while (and alist (not elt))
|
|
369 (setq acc (car (car alist))
|
|
370 elt (car (rassq value (cdr (car alist))))
|
|
371 alist (cdr alist)))
|
|
372 (if elt
|
|
373 (cons acc elt))))
|
|
374
|
|
375 (defun iso-unaccentuate (start end)
|
|
376 "Convert accented characters in the region into two-character sequences.
|
|
377 Noninteractively, this operates on text from START to END.
|
|
378 This uses the opposite of the conversion done by ISO Accents mode for type-in."
|
|
379 (interactive "r")
|
|
380 (save-excursion
|
|
381 (save-restriction
|
|
382 (narrow-to-region start end)
|
|
383 (goto-char start)
|
|
384 (let (entry)
|
|
385 (while (< (point) end)
|
|
386 (if (and (> (following-char) 127)
|
|
387 (setq entry (iso-accent-rassoc-unit (following-char)
|
|
388 iso-accents-list)))
|
|
389 (progn
|
|
390 (delete-char 1)
|
|
391 (insert (car entry) (cdr entry))
|
|
392 (setq end (1+ end)))
|
|
393 (forward-char 1)))))))
|
|
394
|
|
395 (defun iso-deaccentuate (start end)
|
|
396 "Convert accented characters in the region into unaccented characters.
|
|
397 Noninteractively, this operates on text from START to END."
|
|
398 (interactive "r")
|
|
399 (save-excursion
|
|
400 (save-restriction
|
|
401 (narrow-to-region start end)
|
|
402 (goto-char start)
|
|
403 (let (entry)
|
|
404 (while (< (point) end)
|
|
405 (if (and (> (following-char) 127)
|
|
406 (setq entry (iso-accent-rassoc-unit (following-char)
|
|
407 iso-accents-list)))
|
|
408 (progn
|
|
409 (delete-char 1)
|
|
410 (insert (cdr entry)))
|
|
411 (forward-char 1)))))))
|
|
412
|
|
413 ;; Set up the default settings.
|
|
414 (iso-accents-customize "latin-1")
|
|
415
|
|
416 ;; Use Iso-Accents mode in the minibuffer
|
|
417 ;; if it was in use in the previous buffer.
|
|
418 (defun iso-acc-minibuf-setup ()
|
|
419 (setq iso-accents-mode
|
|
420 (save-excursion
|
|
421 (set-buffer (window-buffer minibuffer-scroll-window))
|
|
422 iso-accents-mode)))
|
|
423
|
|
424 (add-hook 'minibuf-setup-hook 'iso-acc-minibuf-setup)
|
|
425
|
|
426 ;;; iso-acc.el ends here
|