Mercurial > emacs
annotate lisp/international/iso-cvt.el @ 36437:d45267642a42
(xm_update_radiobox, update_one_menu_entry)
(xm_update_one_widget): Use XtSetSensitive instead of setting the
value of XmNsensitive. From Rick Scott
<rwscott@alumni.uwaterloo.ca>.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 28 Feb 2001 14:54:54 +0000 |
parents | 879195ddd0d6 |
children | b174db545cfd |
rev | line source |
---|---|
28393 | 1 ;;; iso-cvt.-el -- translate ISO 8859-1 from/to various encodings -*- coding: iso-latin-1 -*- |
13337 | 2 ;; This file was formerly called gm-lingo.el. |
3 | |
28393 | 4 ;; Copyright (C) 1993, 1994, 1995, 1996, 1998, 2000 Free Software Foundation, Inc. |
7260 | 5 |
6 ;; Author: Michael Gschwind <mike@vlsivie.tuwien.ac.at> | |
7 ;; Keywords: tex, iso, latin, i18n | |
8 | |
9 ;; This file is part of GNU Emacs. | |
10 | |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
12 ;; it under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
14169 | 22 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
24 ;; Boston, MA 02111-1307, USA. | |
7260 | 25 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
26 ;;; Commentary: |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
27 ;; This lisp code is a general framework for translating various |
18228 | 28 ;; representations of the same data. |
29 ;; among other things it can be used to translate TeX, HTML, and compressed | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
30 ;; files to ISO 8859-1. It can also be used to translate different charsets |
18228 | 31 ;; such as IBM PC, Macintosh or HP Roman8. |
32 ;; Note that many translations use the GNU recode tool to do the actual | |
33 ;; conversion. So you might want to install that tool to get the full | |
34 ;; benefit of iso-cvt.el | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
35 |
18228 | 36 ; TO DO: |
28393 | 37 ; Cover more cases for translation. (There is an infinite number of ways to |
18228 | 38 ; represent accented characters in TeX) |
7260 | 39 |
18228 | 40 ;; SEE ALSO: |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
41 ; If you are interested in questions related to using the ISO 8859-1 |
18228 | 42 ; characters set (configuring emacs, Unix, etc. to use ISO), then you |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
43 ; can get the ISO 8859-1 FAQ via anonymous ftp from |
28425
6cc408ca6aef
Fix comment. Don't bother to require format.
Dave Love <fx@gnu.org>
parents:
28393
diff
changeset
|
44 ; ftp.vlsivie.tuwien.ac.at in /pub/8bit/FAQ-ISO-8859-1 |
7260 | 45 |
46 ;;; Code: | |
47 | |
48 (defvar iso-spanish-trans-tab | |
49 '( | |
50 ("~n" "ñ") | |
51 ("\([a-zA-Z]\)#" "\\1ñ") | |
52 ("~N" "Ñ") | |
53 ("\\([-a-zA-Z\"`]\\)\"u" "\\1ü") | |
54 ("\\([-a-zA-Z\"`]\\)\"U" "\\1Ü") | |
55 ("\\([-a-zA-Z]\\)'o" "\\1ó") | |
56 ("\\([-a-zA-Z]\\)'O" "\\Ó") | |
57 ("\\([-a-zA-Z]\\)'e" "\\1é") | |
58 ("\\([-a-zA-Z]\\)'E" "\\1É") | |
59 ("\\([-a-zA-Z]\\)'a" "\\1á") | |
60 ("\\([-a-zA-Z]\\)'A" "\\1A") | |
61 ("\\([-a-zA-Z]\\)'i" "\\1í") | |
62 ("\\([-a-zA-Z]\\)'I" "\\1Í") | |
63 ) | |
64 "Spanish translation table.") | |
65 | |
18228 | 66 (defun iso-translate-conventions (from to trans-tab) |
7850
b6f3dd2511bc
(iso-translate-conventions): Get rid of interactive spec.
Richard M. Stallman <rms@gnu.org>
parents:
7831
diff
changeset
|
67 "Use the translation table TRANS-TAB to translate the current buffer." |
7260 | 68 (save-excursion |
18228 | 69 (save-restriction |
70 (narrow-to-region from to) | |
71 (goto-char from) | |
72 (let ((work-tab trans-tab) | |
73 (buffer-read-only nil) | |
74 (case-fold-search nil)) | |
75 (while work-tab | |
76 (save-excursion | |
77 (let ((trans-this (car work-tab))) | |
78 (while (re-search-forward (car trans-this) nil t) | |
79 (replace-match (car (cdr trans-this)) t nil))) | |
80 (setq work-tab (cdr work-tab))))) | |
81 (point-max)))) | |
7260 | 82 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
83 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
84 (defun iso-spanish (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
85 "Translate net conventions for Spanish to ISO 8859-1. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
86 The region between FROM and TO is translated using the table TRANS-TAB. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
87 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
88 (interactive "*r") |
18228 | 89 (iso-translate-conventions from to iso-spanish-trans-tab)) |
7260 | 90 |
91 (defvar iso-aggressive-german-trans-tab | |
92 '( | |
93 ("\"a" "ä") | |
94 ("\"A" "Ä") | |
95 ("\"o" "ö") | |
96 ("\"O" "Ö") | |
97 ("\"u" "ü") | |
98 ("\"U" "Ü") | |
99 ("\"s" "ß") | |
100 ("\\\\3" "ß") | |
101 ) | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
102 "German translation table. |
10434
5cb0747f521f
(iso-aggressive-german-trans-tab): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
10081
diff
changeset
|
103 This table uses an aggressive translation approach and may erroneously |
5cb0747f521f
(iso-aggressive-german-trans-tab): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
10081
diff
changeset
|
104 translate too much.") |
7260 | 105 |
106 (defvar iso-conservative-german-trans-tab | |
107 '( | |
108 ("\\([-a-zA-Z\"`]\\)\"a" "\\1ä") | |
109 ("\\([-a-zA-Z\"`]\\)\"A" "\\1Ä") | |
110 ("\\([-a-zA-Z\"`]\\)\"o" "\\1ö") | |
111 ("\\([-a-zA-Z\"`]\\)\"O" "\\1Ö") | |
112 ("\\([-a-zA-Z\"`]\\)\"u" "\\1ü") | |
113 ("\\([-a-zA-Z\"`]\\)\"U" "\\1Ü") | |
114 ("\\([-a-zA-Z\"`]\\)\"s" "\\1ß") | |
115 ("\\([-a-zA-Z\"`]\\)\\\\3" "\\1ß") | |
116 ) | |
117 "German translation table. | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
118 This table uses a conservative translation approach and may translate too |
7260 | 119 little.") |
120 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
121 (defvar iso-german-trans-tab iso-aggressive-german-trans-tab |
7260 | 122 "Currently active translation table for German.") |
123 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
124 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
125 (defun iso-german (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
126 "Translate net conventions for German to ISO 8859-1. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
127 The region between FROM and TO is translated using the table TRANS-TAB. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
128 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
129 (interactive "*r") |
18228 | 130 (iso-translate-conventions from to iso-german-trans-tab)) |
7260 | 131 |
132 (defvar iso-iso2tex-trans-tab | |
133 '( | |
134 ("ä" "{\\\\\"a}") | |
135 ("à" "{\\\\`a}") | |
136 ("á" "{\\\\'a}") | |
137 ("ã" "{\\\\~a}") | |
138 ("â" "{\\\\^a}") | |
139 ("ë" "{\\\\\"e}") | |
140 ("è" "{\\\\`e}") | |
141 ("é" "{\\\\'e}") | |
142 ("ê" "{\\\\^e}") | |
143 ("ï" "{\\\\\"\\\\i}") | |
144 ("ì" "{\\\\`\\\\i}") | |
145 ("í" "{\\\\'\\\\i}") | |
146 ("î" "{\\\\^\\\\i}") | |
147 ("ö" "{\\\\\"o}") | |
148 ("ò" "{\\\\`o}") | |
149 ("ó" "{\\\\'o}") | |
150 ("õ" "{\\\\~o}") | |
151 ("ô" "{\\\\^o}") | |
152 ("ü" "{\\\\\"u}") | |
153 ("ù" "{\\\\`u}") | |
154 ("ú" "{\\\\'u}") | |
155 ("û" "{\\\\^u}") | |
156 ("Ä" "{\\\\\"A}") | |
157 ("À" "{\\\\`A}") | |
158 ("Á" "{\\\\'A}") | |
159 ("Ã" "{\\\\~A}") | |
160 ("Â" "{\\\\^A}") | |
161 ("Ë" "{\\\\\"E}") | |
162 ("È" "{\\\\`E}") | |
163 ("É" "{\\\\'E}") | |
164 ("Ê" "{\\\\^E}") | |
165 ("Ï" "{\\\\\"I}") | |
166 ("Ì" "{\\\\`I}") | |
167 ("Í" "{\\\\'I}") | |
168 ("Î" "{\\\\^I}") | |
169 ("Ö" "{\\\\\"O}") | |
170 ("Ò" "{\\\\`O}") | |
171 ("Ó" "{\\\\'O}") | |
172 ("Õ" "{\\\\~O}") | |
173 ("Ô" "{\\\\^O}") | |
174 ("Ü" "{\\\\\"U}") | |
175 ("Ù" "{\\\\`U}") | |
176 ("Ú" "{\\\\'U}") | |
177 ("Û" "{\\\\^U}") | |
178 ("ñ" "{\\\\~n}") | |
179 ("Ñ" "{\\\\~N}") | |
180 ("ç" "{\\\\c c}") | |
181 ("Ç" "{\\\\c C}") | |
182 ("ß" "{\\\\ss}") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
183 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
184 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
185 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
186 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
187 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
188 ("£" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
189 ("¶" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
190 ("§" "{\\\\S}") |
7260 | 191 ("¿" "{?`}") |
192 ("¡" "{!`}") | |
193 ) | |
194 "Translation table for translating ISO 8859-1 characters to TeX sequences.") | |
195 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
196 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
197 (defun iso-iso2tex (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
198 "Translate ISO 8859-1 characters to TeX sequences. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
199 The region between FROM and TO is translated using the table TRANS-TAB. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
200 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
201 (interactive "*r") |
18228 | 202 (iso-translate-conventions from to iso-iso2tex-trans-tab)) |
7260 | 203 |
204 (defvar iso-tex2iso-trans-tab | |
205 '( | |
206 ("{\\\\\"a}" "ä") | |
207 ("{\\\\`a}" "à") | |
208 ("{\\\\'a}" "á") | |
209 ("{\\\\~a}" "ã") | |
210 ("{\\\\^a}" "â") | |
211 ("{\\\\\"e}" "ë") | |
212 ("{\\\\`e}" "è") | |
213 ("{\\\\'e}" "é") | |
214 ("{\\\\^e}" "ê") | |
215 ("{\\\\\"\\\\i}" "ï") | |
216 ("{\\\\`\\\\i}" "ì") | |
217 ("{\\\\'\\\\i}" "í") | |
218 ("{\\\\^\\\\i}" "î") | |
219 ("{\\\\\"i}" "ï") | |
220 ("{\\\\`i}" "ì") | |
221 ("{\\\\'i}" "í") | |
222 ("{\\\\^i}" "î") | |
223 ("{\\\\\"o}" "ö") | |
224 ("{\\\\`o}" "ò") | |
225 ("{\\\\'o}" "ó") | |
226 ("{\\\\~o}" "õ") | |
227 ("{\\\\^o}" "ô") | |
228 ("{\\\\\"u}" "ü") | |
229 ("{\\\\`u}" "ù") | |
230 ("{\\\\'u}" "ú") | |
231 ("{\\\\^u}" "û") | |
232 ("{\\\\\"A}" "Ä") | |
233 ("{\\\\`A}" "À") | |
234 ("{\\\\'A}" "Á") | |
235 ("{\\\\~A}" "Ã") | |
236 ("{\\\\^A}" "Â") | |
237 ("{\\\\\"E}" "Ë") | |
238 ("{\\\\`E}" "È") | |
239 ("{\\\\'E}" "É") | |
240 ("{\\\\^E}" "Ê") | |
241 ("{\\\\\"I}" "Ï") | |
242 ("{\\\\`I}" "Ì") | |
243 ("{\\\\'I}" "Í") | |
244 ("{\\\\^I}" "Î") | |
245 ("{\\\\\"O}" "Ö") | |
246 ("{\\\\`O}" "Ò") | |
247 ("{\\\\'O}" "Ó") | |
248 ("{\\\\~O}" "Õ") | |
249 ("{\\\\^O}" "Ô") | |
250 ("{\\\\\"U}" "Ü") | |
251 ("{\\\\`U}" "Ù") | |
252 ("{\\\\'U}" "Ú") | |
253 ("{\\\\^U}" "Û") | |
254 ("{\\\\~n}" "ñ") | |
255 ("{\\\\~N}" "Ñ") | |
256 ("{\\\\c c}" "ç") | |
257 ("{\\\\c C}" "Ç") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
258 ("\\\\\"a" "ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
259 ("\\\\`a" "à") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
260 ("\\\\'a" "á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
261 ("\\\\~a" "ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
262 ("\\\\^a" "â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
263 ("\\\\\"e" "ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
264 ("\\\\`e" "è") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
265 ("\\\\'e" "é") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
266 ("\\\\^e" "ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
267 ("\\\\\"\\\\i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
268 ("\\\\`\\\\i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
269 ("\\\\'\\\\i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
270 ("\\\\^\\\\i" "î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
271 ("\\\\\"i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
272 ("\\\\`i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
273 ("\\\\'i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
274 ("\\\\^i" "î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
275 ("\\\\\"o" "ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
276 ("\\\\`o" "ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
277 ("\\\\'o" "ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
278 ("\\\\~o" "õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
279 ("\\\\^o" "ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
280 ("\\\\\"u" "ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
281 ("\\\\`u" "ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
282 ("\\\\'u" "ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
283 ("\\\\^u" "û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
284 ("\\\\\"A" "Ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
285 ("\\\\`A" "À") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
286 ("\\\\'A" "Á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
287 ("\\\\~A" "Ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
288 ("\\\\^A" "Â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
289 ("\\\\\"E" "Ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
290 ("\\\\`E" "È") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
291 ("\\\\'E" "É") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
292 ("\\\\^E" "Ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
293 ("\\\\\"I" "Ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
294 ("\\\\`I" "Ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
295 ("\\\\'I" "Í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
296 ("\\\\^I" "Î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
297 ("\\\\\"O" "Ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
298 ("\\\\`O" "Ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
299 ("\\\\'O" "Ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
300 ("\\\\~O" "Õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
301 ("\\\\^O" "Ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
302 ("\\\\\"U" "Ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
303 ("\\\\`U" "Ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
304 ("\\\\'U" "Ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
305 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
306 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
307 ("\\\\~N" "Ñ") |
7260 | 308 ("\\\\\"{a}" "ä") |
309 ("\\\\`{a}" "à") | |
310 ("\\\\'{a}" "á") | |
311 ("\\\\~{a}" "ã") | |
312 ("\\\\^{a}" "â") | |
313 ("\\\\\"{e}" "ë") | |
314 ("\\\\`{e}" "è") | |
315 ("\\\\'{e}" "é") | |
316 ("\\\\^{e}" "ê") | |
317 ("\\\\\"{\\\\i}" "ï") | |
318 ("\\\\`{\\\\i}" "ì") | |
319 ("\\\\'{\\\\i}" "í") | |
320 ("\\\\^{\\\\i}" "î") | |
321 ("\\\\\"{i}" "ï") | |
322 ("\\\\`{i}" "ì") | |
323 ("\\\\'{i}" "í") | |
324 ("\\\\^{i}" "î") | |
325 ("\\\\\"{o}" "ö") | |
326 ("\\\\`{o}" "ò") | |
327 ("\\\\'{o}" "ó") | |
328 ("\\\\~{o}" "õ") | |
329 ("\\\\^{o}" "ô") | |
330 ("\\\\\"{u}" "ü") | |
331 ("\\\\`{u}" "ù") | |
332 ("\\\\'{u}" "ú") | |
333 ("\\\\^{u}" "û") | |
334 ("\\\\\"{A}" "Ä") | |
335 ("\\\\`{A}" "À") | |
336 ("\\\\'{A}" "Á") | |
337 ("\\\\~{A}" "Ã") | |
338 ("\\\\^{A}" "Â") | |
339 ("\\\\\"{E}" "Ë") | |
340 ("\\\\`{E}" "È") | |
341 ("\\\\'{E}" "É") | |
342 ("\\\\^{E}" "Ê") | |
343 ("\\\\\"{I}" "Ï") | |
344 ("\\\\`{I}" "Ì") | |
345 ("\\\\'{I}" "Í") | |
346 ("\\\\^{I}" "Î") | |
347 ("\\\\\"{O}" "Ö") | |
348 ("\\\\`{O}" "Ò") | |
349 ("\\\\'{O}" "Ó") | |
350 ("\\\\~{O}" "Õ") | |
351 ("\\\\^{O}" "Ô") | |
352 ("\\\\\"{U}" "Ü") | |
353 ("\\\\`{U}" "Ù") | |
354 ("\\\\'{U}" "Ú") | |
355 ("\\\\^{U}" "Û") | |
356 ("\\\\~{n}" "ñ") | |
357 ("\\\\~{N}" "Ñ") | |
358 ("\\\\c{c}" "ç") | |
359 ("\\\\c{C}" "Ç") | |
360 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
361 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
362 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
363 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
364 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
365 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
366 ("\\\\copyright{}" "\251") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
367 ("{\\\\pounds}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
368 ("{\\\\P}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
369 ("{\\\\S}" "§" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
370 ("\\\\pounds{}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
371 ("\\\\P{}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
372 ("\\\\S{}" "§" ) |
8538
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
373 ("{\\?`}" "¿") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
374 ("{!`}" "¡") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
375 ("\\?`" "¿") |
7260 | 376 ("!`" "¡") |
377 ) | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
378 "Translation table for translating TeX sequences to ISO 8859-1 characters. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
379 This table is not exhaustive (and due to TeX's power can never be). It only |
7260 | 380 contains commonly used sequences.") |
381 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
382 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
383 (defun iso-tex2iso (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
384 "Translate TeX sequences to ISO 8859-1 characters. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
385 The region between FROM and TO is translated using the table TRANS-TAB. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
386 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
387 (interactive "*r") |
18228 | 388 (iso-translate-conventions from to iso-tex2iso-trans-tab)) |
7260 | 389 |
390 (defvar iso-gtex2iso-trans-tab | |
391 '( | |
392 ("{\\\\\"a}" "ä") | |
393 ("{\\\\`a}" "à") | |
394 ("{\\\\'a}" "á") | |
395 ("{\\\\~a}" "ã") | |
396 ("{\\\\^a}" "â") | |
397 ("{\\\\\"e}" "ë") | |
398 ("{\\\\`e}" "è") | |
399 ("{\\\\'e}" "é") | |
400 ("{\\\\^e}" "ê") | |
401 ("{\\\\\"\\\\i}" "ï") | |
402 ("{\\\\`\\\\i}" "ì") | |
403 ("{\\\\'\\\\i}" "í") | |
404 ("{\\\\^\\\\i}" "î") | |
405 ("{\\\\\"i}" "ï") | |
406 ("{\\\\`i}" "ì") | |
407 ("{\\\\'i}" "í") | |
408 ("{\\\\^i}" "î") | |
409 ("{\\\\\"o}" "ö") | |
410 ("{\\\\`o}" "ò") | |
411 ("{\\\\'o}" "ó") | |
412 ("{\\\\~o}" "õ") | |
413 ("{\\\\^o}" "ô") | |
414 ("{\\\\\"u}" "ü") | |
415 ("{\\\\`u}" "ù") | |
416 ("{\\\\'u}" "ú") | |
417 ("{\\\\^u}" "û") | |
418 ("{\\\\\"A}" "Ä") | |
419 ("{\\\\`A}" "À") | |
420 ("{\\\\'A}" "Á") | |
421 ("{\\\\~A}" "Ã") | |
422 ("{\\\\^A}" "Â") | |
423 ("{\\\\\"E}" "Ë") | |
424 ("{\\\\`E}" "È") | |
425 ("{\\\\'E}" "É") | |
426 ("{\\\\^E}" "Ê") | |
427 ("{\\\\\"I}" "Ï") | |
428 ("{\\\\`I}" "Ì") | |
429 ("{\\\\'I}" "Í") | |
430 ("{\\\\^I}" "Î") | |
431 ("{\\\\\"O}" "Ö") | |
432 ("{\\\\`O}" "Ò") | |
433 ("{\\\\'O}" "Ó") | |
434 ("{\\\\~O}" "Õ") | |
435 ("{\\\\^O}" "Ô") | |
436 ("{\\\\\"U}" "Ü") | |
437 ("{\\\\`U}" "Ù") | |
438 ("{\\\\'U}" "Ú") | |
439 ("{\\\\^U}" "Û") | |
440 ("{\\\\~n}" "ñ") | |
441 ("{\\\\~N}" "Ñ") | |
442 ("{\\\\c c}" "ç") | |
443 ("{\\\\c C}" "Ç") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
444 ("\\\\\"a" "ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
445 ("\\\\`a" "à") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
446 ("\\\\'a" "á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
447 ("\\\\~a" "ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
448 ("\\\\^a" "â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
449 ("\\\\\"e" "ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
450 ("\\\\`e" "è") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
451 ("\\\\'e" "é") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
452 ("\\\\^e" "ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
453 ("\\\\\"\\\\i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
454 ("\\\\`\\\\i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
455 ("\\\\'\\\\i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
456 ("\\\\^\\\\i" "î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
457 ("\\\\\"i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
458 ("\\\\`i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
459 ("\\\\'i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
460 ("\\\\^i" "î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
461 ("\\\\\"o" "ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
462 ("\\\\`o" "ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
463 ("\\\\'o" "ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
464 ("\\\\~o" "õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
465 ("\\\\^o" "ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
466 ("\\\\\"u" "ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
467 ("\\\\`u" "ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
468 ("\\\\'u" "ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
469 ("\\\\^u" "û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
470 ("\\\\\"A" "Ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
471 ("\\\\`A" "À") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
472 ("\\\\'A" "Á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
473 ("\\\\~A" "Ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
474 ("\\\\^A" "Â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
475 ("\\\\\"E" "Ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
476 ("\\\\`E" "È") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
477 ("\\\\'E" "É") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
478 ("\\\\^E" "Ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
479 ("\\\\\"I" "Ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
480 ("\\\\`I" "Ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
481 ("\\\\'I" "Í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
482 ("\\\\^I" "Î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
483 ("\\\\\"O" "Ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
484 ("\\\\`O" "Ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
485 ("\\\\'O" "Ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
486 ("\\\\~O" "Õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
487 ("\\\\^O" "Ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
488 ("\\\\\"U" "Ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
489 ("\\\\`U" "Ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
490 ("\\\\'U" "Ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
491 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
492 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
493 ("\\\\~N" "Ñ") |
7260 | 494 ("\\\\\"{a}" "ä") |
495 ("\\\\`{a}" "à") | |
496 ("\\\\'{a}" "á") | |
497 ("\\\\~{a}" "ã") | |
498 ("\\\\^{a}" "â") | |
499 ("\\\\\"{e}" "ë") | |
500 ("\\\\`{e}" "è") | |
501 ("\\\\'{e}" "é") | |
502 ("\\\\^{e}" "ê") | |
503 ("\\\\\"{\\\\i}" "ï") | |
504 ("\\\\`{\\\\i}" "ì") | |
505 ("\\\\'{\\\\i}" "í") | |
506 ("\\\\^{\\\\i}" "î") | |
507 ("\\\\\"{i}" "ï") | |
508 ("\\\\`{i}" "ì") | |
509 ("\\\\'{i}" "í") | |
510 ("\\\\^{i}" "î") | |
511 ("\\\\\"{o}" "ö") | |
512 ("\\\\`{o}" "ò") | |
513 ("\\\\'{o}" "ó") | |
514 ("\\\\~{o}" "õ") | |
515 ("\\\\^{o}" "ô") | |
516 ("\\\\\"{u}" "ü") | |
517 ("\\\\`{u}" "ù") | |
518 ("\\\\'{u}" "ú") | |
519 ("\\\\^{u}" "û") | |
520 ("\\\\\"{A}" "Ä") | |
521 ("\\\\`{A}" "À") | |
522 ("\\\\'{A}" "Á") | |
523 ("\\\\~{A}" "Ã") | |
524 ("\\\\^{A}" "Â") | |
525 ("\\\\\"{E}" "Ë") | |
526 ("\\\\`{E}" "È") | |
527 ("\\\\'{E}" "É") | |
528 ("\\\\^{E}" "Ê") | |
529 ("\\\\\"{I}" "Ï") | |
530 ("\\\\`{I}" "Ì") | |
531 ("\\\\'{I}" "Í") | |
532 ("\\\\^{I}" "Î") | |
533 ("\\\\\"{O}" "Ö") | |
534 ("\\\\`{O}" "Ò") | |
535 ("\\\\'{O}" "Ó") | |
536 ("\\\\~{O}" "Õ") | |
537 ("\\\\^{O}" "Ô") | |
538 ("\\\\\"{U}" "Ü") | |
539 ("\\\\`{U}" "Ù") | |
540 ("\\\\'{U}" "Ú") | |
541 ("\\\\^{U}" "Û") | |
542 ("\\\\~{n}" "ñ") | |
543 ("\\\\~{N}" "Ñ") | |
544 ("\\\\c{c}" "ç") | |
545 ("\\\\c{C}" "Ç") | |
546 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
547 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
548 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
549 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
550 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
551 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
552 ("\\\\copyright{}" "\251") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
553 ("{\\\\pounds}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
554 ("{\\\\P}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
555 ("{\\\\S}" "§" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
556 ("\\\\pounds{}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
557 ("\\\\P{}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
558 ("\\\\S{}" "§" ) |
7260 | 559 ("?`" "¿") |
560 ("!`" "¡") | |
561 ("{?`}" "¿") | |
562 ("{!`}" "¡") | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
563 ("\"a" "ä") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
564 ("\"A" "Ä") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
565 ("\"o" "ö") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
566 ("\"O" "Ö") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
567 ("\"u" "ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
568 ("\"U" "Ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
569 ("\"s" "ß") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
570 ("\\\\3" "ß") |
7260 | 571 ) |
572 "Translation table for translating German TeX sequences to ISO 8859-1. | |
573 This table is not exhaustive (and due to TeX's power can never be). It only | |
574 contains commonly used sequences.") | |
575 | |
576 (defvar iso-iso2gtex-trans-tab | |
577 '( | |
578 ("ä" "\"a") | |
579 ("à" "{\\\\`a}") | |
580 ("á" "{\\\\'a}") | |
581 ("ã" "{\\\\~a}") | |
582 ("â" "{\\\\^a}") | |
583 ("ë" "{\\\\\"e}") | |
584 ("è" "{\\\\`e}") | |
585 ("é" "{\\\\'e}") | |
586 ("ê" "{\\\\^e}") | |
587 ("ï" "{\\\\\"\\\\i}") | |
588 ("ì" "{\\\\`\\\\i}") | |
589 ("í" "{\\\\'\\\\i}") | |
590 ("î" "{\\\\^\\\\i}") | |
591 ("ö" "\"o") | |
592 ("ò" "{\\\\`o}") | |
593 ("ó" "{\\\\'o}") | |
594 ("õ" "{\\\\~o}") | |
595 ("ô" "{\\\\^o}") | |
596 ("ü" "\"u") | |
597 ("ù" "{\\\\`u}") | |
598 ("ú" "{\\\\'u}") | |
599 ("û" "{\\\\^u}") | |
600 ("Ä" "\"A") | |
601 ("À" "{\\\\`A}") | |
602 ("Á" "{\\\\'A}") | |
603 ("Ã" "{\\\\~A}") | |
604 ("Â" "{\\\\^A}") | |
605 ("Ë" "{\\\\\"E}") | |
606 ("È" "{\\\\`E}") | |
607 ("É" "{\\\\'E}") | |
608 ("Ê" "{\\\\^E}") | |
609 ("Ï" "{\\\\\"I}") | |
610 ("Ì" "{\\\\`I}") | |
611 ("Í" "{\\\\'I}") | |
612 ("Î" "{\\\\^I}") | |
613 ("Ö" "\"O") | |
614 ("Ò" "{\\\\`O}") | |
615 ("Ó" "{\\\\'O}") | |
616 ("Õ" "{\\\\~O}") | |
617 ("Ô" "{\\\\^O}") | |
618 ("Ü" "\"U") | |
619 ("Ù" "{\\\\`U}") | |
620 ("Ú" "{\\\\'U}") | |
621 ("Û" "{\\\\^U}") | |
622 ("ñ" "{\\\\~n}") | |
623 ("Ñ" "{\\\\~N}") | |
624 ("ç" "{\\\\c c}") | |
625 ("Ç" "{\\\\c C}") | |
626 ("ß" "\"s") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
627 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
628 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
629 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
630 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
631 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
632 ("£" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
633 ("¶" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
634 ("§" "{\\\\S}") |
7260 | 635 ("¿" "{?`}") |
636 ("¡" "{!`}") | |
637 ) | |
638 "Translation table for translating ISO 8859-1 characters to German TeX.") | |
639 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
640 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
641 (defun iso-gtex2iso (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
642 "Translate German TeX sequences to ISO 8859-1 characters. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
643 The region between FROM and TO is translated using the table TRANS-TAB. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
644 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
645 (interactive "*r") |
18228 | 646 (iso-translate-conventions from to iso-gtex2iso-trans-tab)) |
7260 | 647 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
648 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
649 (defun iso-iso2gtex (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
650 "Translate ISO 8859-1 characters to German TeX sequences. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
651 The region between FROM and TO is translated using the table TRANS-TAB. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
652 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
653 (interactive "*r") |
18228 | 654 (iso-translate-conventions from to iso-iso2gtex-trans-tab)) |
655 | |
656 (defvar iso-iso2duden-trans-tab | |
657 '(("ä" "ae") | |
658 ("Ä" "Ae") | |
659 ("ö" "oe") | |
660 ("Ö" "Oe") | |
661 ("ü" "ue") | |
662 ("Ü" "Ue") | |
663 ("ß" "ss"))) | |
664 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
665 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
666 (defun iso-iso2duden (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
667 "Translate ISO 8859-1 characters to German TeX sequences. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
668 The region between FROM and TO is translated using the table TRANS-TAB. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
669 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
670 (interactive "*r") |
18228 | 671 (iso-translate-conventions from to iso-iso2duden-trans-tab)) |
7260 | 672 |
28393 | 673 (defvar iso-iso2sgml-trans-tab |
674 '(("À" "À") | |
675 ("Á" "Á") | |
676 ("Â" "Â") | |
677 ("Ã" "Ã") | |
678 ("Ä" "Ä") | |
679 ("Å" "Å") | |
680 ("Æ" "Æ") | |
681 ("Ç" "Ç") | |
682 ("È" "È") | |
683 ("É" "É") | |
684 ("Ê" "Ê") | |
685 ("Ë" "Ë") | |
686 ("Ì" "Ì") | |
687 ("Í" "Í") | |
688 ("Î" "Î") | |
689 ("Ï" "Ï") | |
690 ("Ð" "Ð") | |
691 ("Ñ" "Ñ") | |
692 ("Ò" "Ò") | |
693 ("Ó" "Ó") | |
694 ("Ô" "Ô") | |
695 ("Õ" "Õ") | |
696 ("Ö" "Ö") | |
697 ("Ø" "Ø") | |
698 ("Ù" "Ù") | |
699 ("Ú" "Ú") | |
700 ("Û" "Û") | |
701 ("Ü" "Ü") | |
702 ("Ý" "Ý") | |
703 ("Þ" "Þ") | |
704 ("ß" "ß") | |
705 ("à" "à") | |
706 ("á" "á") | |
707 ("â" "â") | |
708 ("ã" "ã") | |
709 ("ä" "ä") | |
710 ("å" "å") | |
711 ("æ" "æ") | |
712 ("ç" "ç") | |
713 ("è" "è") | |
714 ("é" "é") | |
715 ("ê" "ê") | |
716 ("ë" "ë") | |
717 ("ì" "ì") | |
718 ("í" "í") | |
719 ("î" "î") | |
720 ("ï" "ï") | |
721 ("ð" "ð") | |
722 ("ñ" "ñ") | |
723 ("ò" "ò") | |
724 ("ó" "ó") | |
725 ("ô" "ô") | |
726 ("õ" "õ") | |
727 ("ö" "ö") | |
728 ("ø" "ø") | |
729 ("ù" "ù") | |
730 ("ú" "ú") | |
731 ("û" "û") | |
732 ("ü" "ü") | |
733 ("ý" "ý") | |
734 ("þ" "þ") | |
735 ("ÿ" "ÿ"))) | |
736 | |
737 (defvar iso-sgml2iso-trans-tab | |
738 '(("À" "À") | |
739 ("Á" "Á") | |
740 ("Â" "Â") | |
741 ("Ã" "Ã") | |
742 ("Ä" "Ä") | |
743 ("Å" "Å") | |
744 ("Æ" "Æ") | |
745 ("Ç" "Ç") | |
746 ("È" "È") | |
747 ("É" "É") | |
748 ("Ê" "Ê") | |
749 ("Ë" "Ë") | |
750 ("Ì" "Ì") | |
751 ("Í" "Í") | |
752 ("Î" "Î") | |
753 ("Ï" "Ï") | |
754 ("Ð" "Ð") | |
755 ("Ñ" "Ñ") | |
756 ("Ò" "Ò") | |
757 ("Ó" "Ó") | |
758 ("Ô" "Ô") | |
759 ("Õ" "Õ") | |
760 ("Ö" "Ö") | |
761 ("Ø" "Ø") | |
762 ("Ù" "Ù") | |
763 ("Ú" "Ú") | |
764 ("Û" "Û") | |
765 ("Ü" "Ü") | |
766 ("Ý" "Ý") | |
767 ("Þ" "Þ") | |
768 ("ß" "ß") | |
769 ("à" "à") | |
770 ("á" "á") | |
771 ("â" "â") | |
772 ("ã" "ã") | |
773 ("ä" "ä") | |
774 ("å" "å") | |
775 ("æ" "æ") | |
776 ("ç" "ç") | |
777 ("è" "è") | |
778 ("é" "é") | |
779 ("ê" "ê") | |
780 ("ë" "ë") | |
781 ("ì" "ì") | |
782 ("í" "í") | |
783 ("î" "î") | |
784 ("ï" "ï") | |
785 ("ð" "ð") | |
786 ("ñ" "ñ") | |
787 ("ò" "ò") | |
788 ("ó" "ó") | |
789 ("ô" "ô") | |
790 ("õ" "õ") | |
791 ("ö" "ö") | |
792 ("ø" "ø") | |
793 ("ù" "ù") | |
794 ("ú" "ú") | |
795 ("û" "û") | |
796 ("ü" "ü") | |
797 ("ý" "ý") | |
798 ("þ" "þ") | |
799 ("ÿ" "ÿ"))) | |
800 | |
801 ;;;###autoload | |
802 (defun iso-iso2sgml (from to &optional buffer) | |
803 "Translate ISO 8859-1 characters in the region to SGML entities. | |
804 The entities used are from \"ISO 8879:1986//ENTITIES Added Latin 1//EN\". | |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
805 Optional arg BUFFER is ignored (for use in `format-alist')." |
28393 | 806 (interactive "*r") |
807 (iso-translate-conventions from to iso-iso2sgml-trans-tab)) | |
808 | |
809 ;;;###autoload | |
810 (defun iso-sgml2iso (from to &optional buffer) | |
811 "Translate SGML entities in the region to ISO 8859-1 characters. | |
812 The entities used are from \"ISO 8879:1986//ENTITIES Added Latin 1//EN\". | |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
813 Optional arg BUFFER is ignored (for use in `format-alist')." |
28393 | 814 (interactive "*r") |
815 (iso-translate-conventions from to iso-sgml2iso-trans-tab)) | |
816 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
817 ;;;###autoload |
18228 | 818 (defun iso-cvt-read-only () |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
819 "Warn that format is read-only." |
18228 | 820 (interactive) |
821 (error "This format is read-only; specify another format for writing")) | |
822 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
823 ;;;###autoload |
18228 | 824 (defun iso-cvt-write-only () |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
825 "Warn that format is write-only." |
18228 | 826 (interactive) |
827 (error "This format is write-only")) | |
828 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
829 ;;;###autoload |
18228 | 830 (defun iso-cvt-define-menu () |
831 "Add submenus to the Files menu, to convert to and from various formats." | |
832 (interactive) | |
833 | |
834 (define-key menu-bar-files-menu [load-as-separator] '("--")) | |
835 | |
836 (define-key menu-bar-files-menu [load-as] '("Load As..." . load-as)) | |
837 (defvar load-as-menu-map (make-sparse-keymap "Load As...")) | |
838 (fset 'load-as load-as-menu-map) | |
839 | |
840 ;;(define-key menu-bar-files-menu [insert-as] '("Insert As..." . insert-as)) | |
841 (defvar insert-as-menu-map (make-sparse-keymap "Insert As...")) | |
842 (fset 'insert-as insert-as-menu-map) | |
7260 | 843 |
18228 | 844 (define-key menu-bar-files-menu [write-as] '("Write As..." . write-as)) |
845 (defvar write-as-menu-map (make-sparse-keymap "Write As...")) | |
846 (fset 'write-as write-as-menu-map) | |
847 | |
848 (define-key menu-bar-files-menu [translate-separator] '("--")) | |
849 | |
850 (define-key menu-bar-files-menu [translate-to] '("Translate to..." . translate-to)) | |
851 (defvar translate-to-menu-map (make-sparse-keymap "Translate to...")) | |
852 (fset 'translate-to translate-to-menu-map) | |
853 | |
854 (define-key menu-bar-files-menu [translate-from] '("Translate from..." . translate-from)) | |
855 (defvar translate-from-menu-map (make-sparse-keymap "Translate from...")) | |
856 (fset 'translate-from translate-from-menu-map) | |
7260 | 857 |
18228 | 858 (let ((file-types (reverse format-alist)) |
859 name | |
860 str-name) | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
861 (while file-types |
18228 | 862 (setq name (car (car file-types)) |
863 str-name (car (cdr (car file-types))) | |
864 file-types (cdr file-types)) | |
865 (if (stringp str-name) | |
866 (progn | |
867 (define-key load-as-menu-map (vector name) | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
868 (cons str-name |
28393 | 869 `(lambda (file) |
870 (interactive (format "FFind file (as %s): " ,name)) | |
871 (format-find-file file ',name)))) | |
18228 | 872 (define-key insert-as-menu-map (vector name) |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
873 (cons str-name |
28393 | 874 `(lambda (file) |
875 (interactive (format "FInsert file (as %s): " ,name)) | |
876 (format-insert-file file ',name)))) | |
18228 | 877 (define-key write-as-menu-map (vector name) |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
878 (cons str-name |
28393 | 879 `(lambda (file) |
880 (interactive (format "FWrite file (as %s): " ,name)) | |
881 (format-write-file file ',name)))) | |
18228 | 882 (define-key translate-to-menu-map (vector name) |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
883 (cons str-name |
28393 | 884 `(lambda () |
885 (interactive) | |
886 (format-encode-buffer ',name)))) | |
18228 | 887 (define-key translate-from-menu-map (vector name) |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
888 (cons str-name |
28393 | 889 `(lambda () |
890 (interactive) | |
891 (format-decode-buffer ',name))))))))) | |
892 | |
893 (provide 'iso-cvt) | |
7260 | 894 |
895 ;;; iso-cvt.el ends here |