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>
|
94
|
9 ;; $Revision: 1.3 $
|
|
10 ;; $Date: 1997/02/06 02:08:34 $
|
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
|
|
73 (if (fboundp 'read-event) ()
|
|
74 (defun read-event () (event-key (next-command-event))))
|
|
75
|
94
|
76 (if (fboundp 'character-to-event)
|
|
77 (defun iso-char-to-event (ch)
|
|
78 "returns an event containing the given character"
|
|
79 (character-to-event (list ch)))
|
|
80 (defun iso-char-to-event (ch)
|
|
81 "returns the character itself"
|
|
82 ch))
|
4
|
83
|
|
84 ;; needed for compatibility with XEmacs 19.14 and GNU Emacs 19.30
|
|
85 (if (fboundp 'this-single-command-keys) ()
|
|
86 (if (string-match "Lucid" (version))
|
|
87 (defun this-single-command-keys ()
|
|
88 (setq this-command (not (this-command-keys)))
|
|
89 (this-command-keys))
|
|
90 (defun this-single-command-keys () (this-command-keys))))
|
|
91
|
94
|
92 ;; end of compatibility modules
|
|
93
|
4
|
94 (defvar iso-languages
|
|
95 '(("portuguese"
|
|
96 (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332)
|
|
97 (?C . ?\307) (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363)
|
|
98 (?u . ?\372) (?c . ?\347) (?\ . ?') (space . ?'))
|
|
99 (?` (?A . ?\300) (?a . ?\340) (?\ . ?`) (space . ?`))
|
|
100 (?^ (?A . ?\302) (?E . ?\312) (?O . ?\324) (?a . ?\342) (?e . ?\352)
|
|
101 (?o . ?\364) (?\ . ?^) (space . ?^))
|
|
102 (?\" (?U . ?\334) (?u . ?\374) (?\ . ?\") (space . ?\"))
|
94
|
103 (?\~ (?A . ?\303) (?O . ?\325) (?a . ?\343) (?o . ?\365) (?\ . ?\~)
|
|
104 (space . ?\~))
|
4
|
105 (?, (?c . ?\347) (?C . ?\307)))
|
|
106
|
|
107 ("irish"
|
|
108 (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332)
|
|
109 (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) (?u . ?\372)
|
|
110 (?\ . ?') (space . ?')))
|
|
111
|
|
112 ("french"
|
94
|
113 (?' (?E . ?\311) (?C . ?\307) (?e . ?\351) (?c . ?\347) (?\ . ?')
|
|
114 (space . ?'))
|
|
115 (?` (?A . ?\300) (?E . ?\310) (?a . ?\340) (?e . ?\350) (?\ . ?`)
|
|
116 (space . ?`))
|
4
|
117 (?^ (?A . ?\302) (?E . ?\312) (?I . ?\316) (?O . ?\324) (?U . ?\333)
|
|
118 (?a . ?\342) (?e . ?\352) (?i . ?\356) (?o . ?\364) (?u . ?\373)
|
|
119 (?\ . ?^) (space . ?^))
|
94
|
120 (?\" (?E . ?\313) (?I . ?\317)
|
|
121 (?e . ?\353) (?i . ?\357) (?\ . ?\") (space . ?\"))
|
|
122 (?\~ (?< . ?\253) (?> . ?\273) (?C . ?\307) (?c . ?\347) (?\ . ?\~)
|
|
123 (space . ?\~))
|
4
|
124 (?, (?c . ?\347) (?C . ?\307)))
|
|
125
|
94
|
126 ;;; ISO-8859-3, developed by D. Dale Gulledge <ddg@cci.com>
|
|
127 ("latin-3"
|
|
128 (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323)
|
|
129 (?U . ?\332) (?a . ?\341) (?e . ?\351) (?i . ?\355)
|
|
130 (?o . ?\363) (?u . ?\372) (?\ . ?') (space . ?'))
|
|
131 (?. (?C . ?\305) (?G . ?\325) (?I . ?\251) (?Z . ?\257)
|
|
132 (?c . ?\345) (?g . ?\365) (?z . ?\277))
|
|
133 (?\" (?A . ?\304) (?E . ?\313) (?I . ?\317) (?O . ?\326)
|
|
134 (?U . ?\334) (?a . ?\344) (?e . ?\353) (?i . ?\357)
|
|
135 (?o ?\366) (?u ?\374) (?\ . ?\") (space . ?\"))
|
|
136 (?\/ (?\/ . ?\260) (?\ . ?/) (space . ?/))
|
|
137 (?\~ (?C . ?\307) (?G . ?\253) (?N . ?\321) (?S . ?\252)
|
|
138 (?U . ?\335) (?\~ . ?\270) (?c . ?\347) (?g . ?\273)
|
|
139 (?h . ?\261) (?n . ?\361) (?u . ?\375)
|
|
140 (?\ . ?~) (space . ?~))
|
|
141 (?^ (?A . ?\302) (?C . ?\306) (?E . ?\312) (?G . ?\330)
|
|
142 (?H . ?\246) (?I . ?\316) (?J . ?\254) (?O . ?\324)
|
|
143 (?S . ?\336) (?U . ?\333) (?a . ?\342) (?c . ?\346)
|
|
144 (?e . ?\352) (?g . ?\370) (?h . ?\266) (?i . ?\356)
|
|
145 (?j . ?\274) (?o . ?\364) (?s . ?\376) (?u . ?\373)
|
|
146 (?\ . ?^) (space . \^))
|
|
147 (?` (?A . ?\300) (?E . ?\310) (?I . ?\314) (?O . ?\322)
|
|
148 (?U . ?\331) (?a . ?\340) (?e . ?\350) (?i . ?\354)
|
|
149 (?o . ?\362) (?u . ?\371) (?\ . ?`) (space . ?`)))
|
|
150
|
4
|
151 ("latin-2"
|
|
152 (?' (?A . ?\301) (?C . ?\306) (?D . ?\320) (?E . ?\311) (?I . ?\315)
|
|
153 (?L . ?\305) (?N . ?\321) (?O . ?\323) (?R . ?\300) (?S . ?\246)
|
|
154 (?U . ?\332) (?Y . ?\335) (?Z . ?\254) (?a . ?\341) (?c . ?\346)
|
|
155 (?d . ?\360) (?e . ?\351) (?i . ?\355) (?l . ?\345) (?n . ?\361)
|
|
156 (?o . ?\363) (?r . ?\340) (?s . ?\266) (?u . ?\372) (?y . ?\375)
|
|
157 (?z . ?\274) (?' . ?\264) (?\ . ?') (space . ?'))
|
|
158 (?` (?A . ?\241) (?C . ?\307) (?E . ?\312) (?L . ?\243) (?S . ?\252)
|
|
159 (?T . ?\336) (?Z . ?\257) (?a . ?\261) (?l . ?\263) (?c . ?\347)
|
|
160 (?e . ?\352) (?s . ?\272) (?t . ?\376) (?z . ?\277) (?` . ?\252)
|
|
161 (?. . ?\377) (?\ . ?`) (space . ?`))
|
|
162 (?^ (?A . ?\302) (?O . ?\324) (?a . ?\342) (?o . ?\364)
|
|
163 (?^ . ?^) ; no special code?
|
|
164 (?\ . ?^) (space . ?^))
|
|
165 (?\" (?A . ?\304) (?E . ?\313) (?O . ?\326) (?U . ?\334) (?a . ?\344)
|
|
166 (?e . ?\353) (?o . ?\366) (?s . ?\337) (?u . ?\374) (?\" . ?\250)
|
|
167 (?\ . ?\") (space . ?\"))
|
|
168 (?\~ (?A . ?\303) (?C . ?\310) (?D . ?\317) (?L . ?\245) (?N . ?\322)
|
|
169 (?O . ?\325) (?R . ?\330) (?S . ?\251) (?T . ?\253) (?U . ?\333)
|
|
170 (?Z . ?\256) (?a . ?\323) (?c . ?\350) (?d . ?\357) (?l . ?\265)
|
|
171 (?n . ?\362) (?o . ?\365) (?r . ?\370) (?s . ?\271) (?t . ?\273)
|
|
172 (?u . ?\373) (?z . ?\276)
|
|
173 (?v . ?\242) ; v accent
|
|
174 (?\~ . ?\242) ; v accent
|
|
175 (?\. . ?\270) ; cedilla accent
|
|
176 (?\ . ?\~) (space . ?\~)))
|
|
177
|
|
178 ("latin-1"
|
|
179 (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332)
|
|
180 (?Y . ?\335) (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363)
|
|
181 (?u . ?\372) (?y . ?\375) (?' . ?\264) (?\ . ?') (space . ?'))
|
|
182 (?` (?A . ?\300) (?E . ?\310) (?I . ?\314) (?O . ?\322) (?U . ?\331)
|
|
183 (?a . ?\340) (?e . ?\350) (?i . ?\354) (?o . ?\362) (?u . ?\371)
|
|
184 (?` . ?`) (?\ . ?`) (space . ?`))
|
|
185 (?^ (?A . ?\302) (?E . ?\312) (?I . ?\316) (?O . ?\324) (?U . ?\333)
|
|
186 (?a . ?\342) (?e . ?\352) (?i . ?\356) (?o . ?\364) (?u . ?\373)
|
|
187 (?^ . ?^) (?\ . ?^) (space . ?^))
|
|
188 (?\" (?A . ?\304) (?E . ?\313) (?I . ?\317) (?O . ?\326) (?U . ?\334)
|
|
189 (?a . ?\344) (?e . ?\353) (?i . ?\357) (?o . ?\366) (?s . ?\337)
|
|
190 (?u . ?\374) (?y . ?\377) (?\" . ?\250) (?\ . ?\") (space . ?\"))
|
|
191 (?\~ (?A . ?\303) (?C . ?\307) (?D . ?\320) (?N . ?\321) (?O . ?\325)
|
|
192 (?T . ?\336) (?a . ?\343) (?c . ?\347) (?d . ?\360) (?n . ?\361)
|
|
193 (?o . ?\365) (?t . ?\376) (?> . ?\273) (?< . ?\253) (?\~ . ?\270)
|
|
194 (?! . ?\241) (?? . ?\277)
|
|
195 (?\ . ?\~) (space . ?\~))
|
|
196 (?\/ (?A . ?\305) (?E . ?\306) (?O . ?\330) (?a . ?\345) (?e . ?\346)
|
|
197 (?o . ?\370) (?\/ . ?\260) (?\ . ?\/) (space . ?\/))))
|
|
198 "List of language-specific customizations for the ISO Accents mode.
|
|
199
|
|
200 Each element of the list is of the form
|
|
201
|
|
202 (LANGUAGE
|
|
203 (PSEUDO-ACCENT MAPPINGS)
|
|
204 (PSEUDO-ACCENT MAPPINGS)
|
|
205 ...)
|
|
206
|
|
207 LANGUAGE is a string naming the language.
|
|
208 PSEUDO-ACCENT is a char specifying an accent key.
|
|
209 MAPPINGS are cons cells of the form (CHAR . ISO-CHAR).
|
|
210
|
|
211 The net effect is that the key sequence PSEUDO-ACCENT CHAR is mapped
|
|
212 to ISO-CHAR on input.")
|
|
213
|
|
214 (defvar iso-language nil
|
|
215 "Language for which ISO Accents mode is currently customized.
|
|
216 Change it with the `iso-accents-customize' function.")
|
|
217
|
|
218 (defvar iso-accents-list nil
|
|
219 "Association list for ISO accent combinations, for the chosen language.")
|
|
220
|
|
221 (defvar iso-accents-mode nil
|
|
222 "*Non-nil enables ISO Accents mode.
|
|
223 Setting this variable makes it local to the current buffer.
|
|
224 See the function `iso-accents-mode'.")
|
|
225 (make-variable-buffer-local 'iso-accents-mode)
|
|
226
|
94
|
227 (defvar iso-accents-enable '(?' ?` ?^ ?\" ?~ ?/ ?, ?.)
|
4
|
228 "*List of accent keys that become prefixes in ISO Accents mode.
|
94
|
229 The default is (?' ?` ?^ ?\" ?~ ?/ ?, ?.), which contains all the supported
|
4
|
230 accent keys. If you set this variable to a list in which some of those
|
|
231 characters are missing, the missing ones do not act as accents.
|
|
232
|
|
233 Note that if you specify a language with `iso-accents-customize',
|
|
234 that can also turn off certain prefixes (whichever ones are not needed in
|
|
235 the language you choose).")
|
|
236
|
|
237 (defun iso-accents-accent-key (prompt)
|
|
238 "Modify the following character by adding an accent to it."
|
|
239 ;; Pick up the accent character.
|
|
240 (if (and iso-accents-mode
|
|
241 (memq last-input-char iso-accents-enable))
|
|
242 (iso-accents-compose prompt)
|
|
243 (char-to-string last-input-char)))
|
|
244
|
|
245 (defun iso-accents-compose (prompt)
|
|
246 (let* ((first-char last-input-char)
|
|
247 (list (assq first-char iso-accents-list))
|
|
248 ;; Wait for the second key and look up the combination.
|
|
249 (second-char (if (or prompt
|
|
250 (not (eq (key-binding "a")
|
|
251 'self-insert-command))
|
|
252 ;; Not at start of a key sequence.
|
|
253 (> (length (this-single-command-keys)) 1)
|
|
254 ;; Called from anything but the command loop.
|
|
255 this-command)
|
|
256 (progn
|
|
257 (message "%s%c"
|
|
258 (or prompt "Compose with ")
|
|
259 first-char)
|
|
260 (read-event))
|
|
261 (insert first-char)
|
|
262 (prog1 (read-event)
|
|
263 (delete-region (1- (point)) (point)))))
|
|
264 (entry (cdr (assq second-char list))))
|
|
265 (if entry
|
94
|
266 ;; Found it: return the mapped char
|
|
267 (vector (iso-char-to-event entry))
|
4
|
268 ;; Otherwise, advance and schedule the second key for execution.
|
94
|
269 (setq unread-command-events (cons (iso-char-to-event second-char)
|
|
270 unread-command-events))
|
|
271 (vector (iso-char-to-event first-char)))))
|
4
|
272
|
|
273 ;; It is a matter of taste if you want the minor mode indicated
|
|
274 ;; in the mode line...
|
|
275 ;; If so, uncomment the next four lines.
|
|
276 ;; (or (assq 'iso-accents-mode minor-mode-alist)
|
|
277 ;; (setq minor-mode-alist
|
|
278 ;; (append minor-mode-alist
|
|
279 ;; '((iso-accents-mode " ISO-Acc")))))
|
|
280
|
|
281 ;;;###autoload
|
|
282 (defun iso-accents-mode (&optional arg)
|
|
283 "Toggle ISO Accents mode, in which accents modify the following letter.
|
|
284 This permits easy insertion of accented characters according to ISO-8859-1.
|
|
285 When Iso-accents mode is enabled, accent character keys
|
|
286 \(`, ', \", ^, / and ~) do not self-insert; instead, they modify the following
|
|
287 letter key so that it inserts an ISO accented letter.
|
|
288
|
|
289 You can customize ISO Accents mode to a particular language
|
|
290 with the command `iso-accents-customize'.
|
|
291
|
|
292 Special combinations: ~c gives a c with cedilla,
|
|
293 ~d gives an Icelandic eth (d with dash).
|
|
294 ~t gives an Icelandic thorn.
|
|
295 \"s gives German sharp s.
|
|
296 /a gives a with ring.
|
|
297 /e gives an a-e ligature.
|
|
298 ~< and ~> give guillemots.
|
|
299 ~! gives an inverted exclamation mark.
|
|
300 ~? gives an inverted question mark.
|
|
301
|
|
302 With an argument, a positive argument enables ISO Accents mode,
|
|
303 and a negative argument disables it."
|
|
304
|
|
305 (interactive "P")
|
|
306
|
|
307 (if (if arg
|
|
308 ;; Negative arg means switch it off.
|
|
309 (<= (prefix-numeric-value arg) 0)
|
|
310 ;; No arg means toggle.
|
|
311 iso-accents-mode)
|
|
312 (setq iso-accents-mode nil)
|
|
313
|
|
314 ;; Enable electric accents.
|
|
315 (setq iso-accents-mode t)))
|
|
316
|
|
317 (defun iso-accents-customize (language)
|
|
318 "Customize the ISO accents machinery for a particular language.
|
|
319 It selects the customization based on the specifications in the
|
|
320 `iso-languages' variable."
|
|
321 (interactive (list (completing-read "Language: " iso-languages nil t)))
|
94
|
322 (let ((table (assoc language iso-languages))
|
|
323 tail)
|
4
|
324 (if (not table)
|
|
325 (error "Unknown language '%s'" language)
|
|
326 (setq iso-language language
|
|
327 iso-accents-list (cdr table))
|
|
328 (if key-translation-map
|
|
329 (substitute-key-definition
|
|
330 'iso-accents-accent-key nil key-translation-map)
|
|
331 (setq key-translation-map (make-sparse-keymap)))
|
|
332 ;; Set up translations for all the characters that are used as
|
|
333 ;; accent prefixes in this language.
|
|
334 (setq tail iso-accents-list)
|
|
335 (while tail
|
94
|
336 (define-key key-translation-map (vector (iso-char-to-event
|
|
337 (car (car tail))))
|
4
|
338 'iso-accents-accent-key)
|
|
339 (setq tail (cdr tail))))))
|
|
340
|
|
341 (defun iso-accentuate (start end)
|
|
342 "Convert two-character sequences in region into accented characters.
|
|
343 Noninteractively, this operates on text from START to END.
|
|
344 This uses the same conversion that ISO Accents mode uses for type-in."
|
|
345 (interactive "r")
|
|
346 (save-excursion
|
|
347 (save-restriction
|
|
348 (narrow-to-region start end)
|
|
349 (goto-char start)
|
|
350 (forward-char 1)
|
|
351 (let (entry)
|
|
352 (while (< (point) end)
|
|
353 (if (and (memq (preceding-char) iso-accents-enable)
|
|
354 (setq entry (cdr (assq (following-char) (assq (preceding-char) iso-accents-list)))))
|
|
355 (progn
|
|
356 (forward-char -1)
|
|
357 (delete-char 2)
|
|
358 (insert entry)
|
|
359 (setq end (1- end)))
|
|
360 (forward-char 1)))))))
|
|
361
|
|
362 (defun iso-accent-rassoc-unit (value alist)
|
|
363 (let (elt acc)
|
|
364 (while (and alist (not elt))
|
|
365 (setq acc (car (car alist))
|
|
366 elt (car (rassq value (cdr (car alist))))
|
|
367 alist (cdr alist)))
|
|
368 (if elt
|
|
369 (cons acc elt))))
|
|
370
|
|
371 (defun iso-unaccentuate (start end)
|
|
372 "Convert accented characters in the region into two-character sequences.
|
|
373 Noninteractively, this operates on text from START to END.
|
|
374 This uses the opposite of the conversion done by ISO Accents mode for type-in."
|
|
375 (interactive "r")
|
|
376 (save-excursion
|
|
377 (save-restriction
|
|
378 (narrow-to-region start end)
|
|
379 (goto-char start)
|
|
380 (let (entry)
|
|
381 (while (< (point) end)
|
|
382 (if (and (> (following-char) 127)
|
|
383 (setq entry (iso-accent-rassoc-unit (following-char)
|
|
384 iso-accents-list)))
|
|
385 (progn
|
|
386 (delete-char 1)
|
|
387 (insert (car entry) (cdr entry))
|
|
388 (setq end (1+ end)))
|
|
389 (forward-char 1)))))))
|
|
390
|
|
391 (defun iso-deaccentuate (start end)
|
|
392 "Convert accented characters in the region into unaccented characters.
|
|
393 Noninteractively, this operates on text from START to END."
|
|
394 (interactive "r")
|
|
395 (save-excursion
|
|
396 (save-restriction
|
|
397 (narrow-to-region start end)
|
|
398 (goto-char start)
|
|
399 (let (entry)
|
|
400 (while (< (point) end)
|
|
401 (if (and (> (following-char) 127)
|
|
402 (setq entry (iso-accent-rassoc-unit (following-char)
|
|
403 iso-accents-list)))
|
|
404 (progn
|
|
405 (delete-char 1)
|
|
406 (insert (cdr entry)))
|
|
407 (forward-char 1)))))))
|
|
408
|
|
409 ;; Set up the default settings.
|
|
410 (iso-accents-customize "latin-1")
|
|
411
|
|
412 ;; Use Iso-Accents mode in the minibuffer
|
|
413 ;; if it was in use in the previous buffer.
|
|
414 (defun iso-acc-minibuf-setup ()
|
|
415 (setq iso-accents-mode
|
|
416 (save-excursion
|
|
417 (set-buffer (window-buffer minibuffer-scroll-window))
|
|
418 iso-accents-mode)))
|
|
419
|
|
420 (add-hook 'minibuf-setup-hook 'iso-acc-minibuf-setup)
|
|
421
|
|
422 ;;; iso-acc.el ends here
|