Mercurial > emacs
annotate lisp/international/iso-cvt.el @ 30545:4fc9847efaf6
*** empty log message ***
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Mon, 31 Jul 2000 15:41:39 +0000 |
parents | 6cc408ca6aef |
children | 879195ddd0d6 |
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. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
87 Optional arg BUFFER is ignored (so that the function can can be used in |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
88 `format-alist')." |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
89 (interactive "*r") |
18228 | 90 (iso-translate-conventions from to iso-spanish-trans-tab)) |
7260 | 91 |
92 (defvar iso-aggressive-german-trans-tab | |
93 '( | |
94 ("\"a" "ä") | |
95 ("\"A" "Ä") | |
96 ("\"o" "ö") | |
97 ("\"O" "Ö") | |
98 ("\"u" "ü") | |
99 ("\"U" "Ü") | |
100 ("\"s" "ß") | |
101 ("\\\\3" "ß") | |
102 ) | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
103 "German translation table. |
10434
5cb0747f521f
(iso-aggressive-german-trans-tab): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
10081
diff
changeset
|
104 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
|
105 translate too much.") |
7260 | 106 |
107 (defvar iso-conservative-german-trans-tab | |
108 '( | |
109 ("\\([-a-zA-Z\"`]\\)\"a" "\\1ä") | |
110 ("\\([-a-zA-Z\"`]\\)\"A" "\\1Ä") | |
111 ("\\([-a-zA-Z\"`]\\)\"o" "\\1ö") | |
112 ("\\([-a-zA-Z\"`]\\)\"O" "\\1Ö") | |
113 ("\\([-a-zA-Z\"`]\\)\"u" "\\1ü") | |
114 ("\\([-a-zA-Z\"`]\\)\"U" "\\1Ü") | |
115 ("\\([-a-zA-Z\"`]\\)\"s" "\\1ß") | |
116 ("\\([-a-zA-Z\"`]\\)\\\\3" "\\1ß") | |
117 ) | |
118 "German translation table. | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
119 This table uses a conservative translation approach and may translate too |
7260 | 120 little.") |
121 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
122 (defvar iso-german-trans-tab iso-aggressive-german-trans-tab |
7260 | 123 "Currently active translation table for German.") |
124 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
125 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
126 (defun iso-german (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
127 "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
|
128 The region between FROM and TO is translated using the table TRANS-TAB. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
129 Optional arg BUFFER is ignored (so that the function can can be used in |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
130 `format-alist')." |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
131 (interactive "*r") |
18228 | 132 (iso-translate-conventions from to iso-german-trans-tab)) |
7260 | 133 |
134 (defvar iso-iso2tex-trans-tab | |
135 '( | |
136 ("ä" "{\\\\\"a}") | |
137 ("à" "{\\\\`a}") | |
138 ("á" "{\\\\'a}") | |
139 ("ã" "{\\\\~a}") | |
140 ("â" "{\\\\^a}") | |
141 ("ë" "{\\\\\"e}") | |
142 ("è" "{\\\\`e}") | |
143 ("é" "{\\\\'e}") | |
144 ("ê" "{\\\\^e}") | |
145 ("ï" "{\\\\\"\\\\i}") | |
146 ("ì" "{\\\\`\\\\i}") | |
147 ("í" "{\\\\'\\\\i}") | |
148 ("î" "{\\\\^\\\\i}") | |
149 ("ö" "{\\\\\"o}") | |
150 ("ò" "{\\\\`o}") | |
151 ("ó" "{\\\\'o}") | |
152 ("õ" "{\\\\~o}") | |
153 ("ô" "{\\\\^o}") | |
154 ("ü" "{\\\\\"u}") | |
155 ("ù" "{\\\\`u}") | |
156 ("ú" "{\\\\'u}") | |
157 ("û" "{\\\\^u}") | |
158 ("Ä" "{\\\\\"A}") | |
159 ("À" "{\\\\`A}") | |
160 ("Á" "{\\\\'A}") | |
161 ("Ã" "{\\\\~A}") | |
162 ("Â" "{\\\\^A}") | |
163 ("Ë" "{\\\\\"E}") | |
164 ("È" "{\\\\`E}") | |
165 ("É" "{\\\\'E}") | |
166 ("Ê" "{\\\\^E}") | |
167 ("Ï" "{\\\\\"I}") | |
168 ("Ì" "{\\\\`I}") | |
169 ("Í" "{\\\\'I}") | |
170 ("Î" "{\\\\^I}") | |
171 ("Ö" "{\\\\\"O}") | |
172 ("Ò" "{\\\\`O}") | |
173 ("Ó" "{\\\\'O}") | |
174 ("Õ" "{\\\\~O}") | |
175 ("Ô" "{\\\\^O}") | |
176 ("Ü" "{\\\\\"U}") | |
177 ("Ù" "{\\\\`U}") | |
178 ("Ú" "{\\\\'U}") | |
179 ("Û" "{\\\\^U}") | |
180 ("ñ" "{\\\\~n}") | |
181 ("Ñ" "{\\\\~N}") | |
182 ("ç" "{\\\\c c}") | |
183 ("Ç" "{\\\\c C}") | |
184 ("ß" "{\\\\ss}") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
185 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
186 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
187 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
188 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
189 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
190 ("£" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
191 ("¶" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
192 ("§" "{\\\\S}") |
7260 | 193 ("¿" "{?`}") |
194 ("¡" "{!`}") | |
195 ) | |
196 "Translation table for translating ISO 8859-1 characters to TeX sequences.") | |
197 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
198 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
199 (defun iso-iso2tex (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
200 "Translate ISO 8859-1 characters to TeX sequences. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
201 The region between FROM and TO is translated using the table TRANS-TAB. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
202 Optional arg BUFFER is ignored (so that the function can can be used in |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
203 `format-alist')." |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
204 (interactive "*r") |
18228 | 205 (iso-translate-conventions from to iso-iso2tex-trans-tab)) |
7260 | 206 |
207 (defvar iso-tex2iso-trans-tab | |
208 '( | |
209 ("{\\\\\"a}" "ä") | |
210 ("{\\\\`a}" "à") | |
211 ("{\\\\'a}" "á") | |
212 ("{\\\\~a}" "ã") | |
213 ("{\\\\^a}" "â") | |
214 ("{\\\\\"e}" "ë") | |
215 ("{\\\\`e}" "è") | |
216 ("{\\\\'e}" "é") | |
217 ("{\\\\^e}" "ê") | |
218 ("{\\\\\"\\\\i}" "ï") | |
219 ("{\\\\`\\\\i}" "ì") | |
220 ("{\\\\'\\\\i}" "í") | |
221 ("{\\\\^\\\\i}" "î") | |
222 ("{\\\\\"i}" "ï") | |
223 ("{\\\\`i}" "ì") | |
224 ("{\\\\'i}" "í") | |
225 ("{\\\\^i}" "î") | |
226 ("{\\\\\"o}" "ö") | |
227 ("{\\\\`o}" "ò") | |
228 ("{\\\\'o}" "ó") | |
229 ("{\\\\~o}" "õ") | |
230 ("{\\\\^o}" "ô") | |
231 ("{\\\\\"u}" "ü") | |
232 ("{\\\\`u}" "ù") | |
233 ("{\\\\'u}" "ú") | |
234 ("{\\\\^u}" "û") | |
235 ("{\\\\\"A}" "Ä") | |
236 ("{\\\\`A}" "À") | |
237 ("{\\\\'A}" "Á") | |
238 ("{\\\\~A}" "Ã") | |
239 ("{\\\\^A}" "Â") | |
240 ("{\\\\\"E}" "Ë") | |
241 ("{\\\\`E}" "È") | |
242 ("{\\\\'E}" "É") | |
243 ("{\\\\^E}" "Ê") | |
244 ("{\\\\\"I}" "Ï") | |
245 ("{\\\\`I}" "Ì") | |
246 ("{\\\\'I}" "Í") | |
247 ("{\\\\^I}" "Î") | |
248 ("{\\\\\"O}" "Ö") | |
249 ("{\\\\`O}" "Ò") | |
250 ("{\\\\'O}" "Ó") | |
251 ("{\\\\~O}" "Õ") | |
252 ("{\\\\^O}" "Ô") | |
253 ("{\\\\\"U}" "Ü") | |
254 ("{\\\\`U}" "Ù") | |
255 ("{\\\\'U}" "Ú") | |
256 ("{\\\\^U}" "Û") | |
257 ("{\\\\~n}" "ñ") | |
258 ("{\\\\~N}" "Ñ") | |
259 ("{\\\\c c}" "ç") | |
260 ("{\\\\c C}" "Ç") | |
7861
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 ("\\\\'a" "á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
264 ("\\\\~a" "ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
265 ("\\\\^a" "â") |
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 ("\\\\`e" "è") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
268 ("\\\\'e" "é") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
269 ("\\\\^e" "ê") |
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 ("\\\\`i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
276 ("\\\\'i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
277 ("\\\\^i" "î") |
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 ("\\\\'o" "ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
281 ("\\\\~o" "õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
282 ("\\\\^o" "ô") |
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 ("\\\\`u" "ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
285 ("\\\\'u" "ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
286 ("\\\\^u" "û") |
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 ("\\\\'A" "Á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
290 ("\\\\~A" "Ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
291 ("\\\\^A" "Â") |
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 ("\\\\`E" "È") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
294 ("\\\\'E" "É") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
295 ("\\\\^E" "Ê") |
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 ("\\\\`I" "Ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
298 ("\\\\'I" "Í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
299 ("\\\\^I" "Î") |
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 ("\\\\'O" "Ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
303 ("\\\\~O" "Õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
304 ("\\\\^O" "Ô") |
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 ("\\\\`U" "Ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
307 ("\\\\'U" "Ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
308 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
309 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
310 ("\\\\~N" "Ñ") |
7260 | 311 ("\\\\\"{a}" "ä") |
312 ("\\\\`{a}" "à") | |
313 ("\\\\'{a}" "á") | |
314 ("\\\\~{a}" "ã") | |
315 ("\\\\^{a}" "â") | |
316 ("\\\\\"{e}" "ë") | |
317 ("\\\\`{e}" "è") | |
318 ("\\\\'{e}" "é") | |
319 ("\\\\^{e}" "ê") | |
320 ("\\\\\"{\\\\i}" "ï") | |
321 ("\\\\`{\\\\i}" "ì") | |
322 ("\\\\'{\\\\i}" "í") | |
323 ("\\\\^{\\\\i}" "î") | |
324 ("\\\\\"{i}" "ï") | |
325 ("\\\\`{i}" "ì") | |
326 ("\\\\'{i}" "í") | |
327 ("\\\\^{i}" "î") | |
328 ("\\\\\"{o}" "ö") | |
329 ("\\\\`{o}" "ò") | |
330 ("\\\\'{o}" "ó") | |
331 ("\\\\~{o}" "õ") | |
332 ("\\\\^{o}" "ô") | |
333 ("\\\\\"{u}" "ü") | |
334 ("\\\\`{u}" "ù") | |
335 ("\\\\'{u}" "ú") | |
336 ("\\\\^{u}" "û") | |
337 ("\\\\\"{A}" "Ä") | |
338 ("\\\\`{A}" "À") | |
339 ("\\\\'{A}" "Á") | |
340 ("\\\\~{A}" "Ã") | |
341 ("\\\\^{A}" "Â") | |
342 ("\\\\\"{E}" "Ë") | |
343 ("\\\\`{E}" "È") | |
344 ("\\\\'{E}" "É") | |
345 ("\\\\^{E}" "Ê") | |
346 ("\\\\\"{I}" "Ï") | |
347 ("\\\\`{I}" "Ì") | |
348 ("\\\\'{I}" "Í") | |
349 ("\\\\^{I}" "Î") | |
350 ("\\\\\"{O}" "Ö") | |
351 ("\\\\`{O}" "Ò") | |
352 ("\\\\'{O}" "Ó") | |
353 ("\\\\~{O}" "Õ") | |
354 ("\\\\^{O}" "Ô") | |
355 ("\\\\\"{U}" "Ü") | |
356 ("\\\\`{U}" "Ù") | |
357 ("\\\\'{U}" "Ú") | |
358 ("\\\\^{U}" "Û") | |
359 ("\\\\~{n}" "ñ") | |
360 ("\\\\~{N}" "Ñ") | |
361 ("\\\\c{c}" "ç") | |
362 ("\\\\c{C}" "Ç") | |
363 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
364 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
365 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
366 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
367 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
368 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
369 ("\\\\copyright{}" "\251") |
10081
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}" "§" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
373 ("\\\\pounds{}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
374 ("\\\\P{}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
375 ("\\\\S{}" "§" ) |
8538
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
376 ("{\\?`}" "¿") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
377 ("{!`}" "¡") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
378 ("\\?`" "¿") |
7260 | 379 ("!`" "¡") |
380 ) | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
381 "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
|
382 This table is not exhaustive (and due to TeX's power can never be). It only |
7260 | 383 contains commonly used sequences.") |
384 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
385 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
386 (defun iso-tex2iso (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
387 "Translate TeX sequences to ISO 8859-1 characters. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
388 The region between FROM and TO is translated using the table TRANS-TAB. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
389 Optional arg BUFFER is ignored (so that the function can can be used in |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
390 `format-alist')." |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
391 (interactive "*r") |
18228 | 392 (iso-translate-conventions from to iso-tex2iso-trans-tab)) |
7260 | 393 |
394 (defvar iso-gtex2iso-trans-tab | |
395 '( | |
396 ("{\\\\\"a}" "ä") | |
397 ("{\\\\`a}" "à") | |
398 ("{\\\\'a}" "á") | |
399 ("{\\\\~a}" "ã") | |
400 ("{\\\\^a}" "â") | |
401 ("{\\\\\"e}" "ë") | |
402 ("{\\\\`e}" "è") | |
403 ("{\\\\'e}" "é") | |
404 ("{\\\\^e}" "ê") | |
405 ("{\\\\\"\\\\i}" "ï") | |
406 ("{\\\\`\\\\i}" "ì") | |
407 ("{\\\\'\\\\i}" "í") | |
408 ("{\\\\^\\\\i}" "î") | |
409 ("{\\\\\"i}" "ï") | |
410 ("{\\\\`i}" "ì") | |
411 ("{\\\\'i}" "í") | |
412 ("{\\\\^i}" "î") | |
413 ("{\\\\\"o}" "ö") | |
414 ("{\\\\`o}" "ò") | |
415 ("{\\\\'o}" "ó") | |
416 ("{\\\\~o}" "õ") | |
417 ("{\\\\^o}" "ô") | |
418 ("{\\\\\"u}" "ü") | |
419 ("{\\\\`u}" "ù") | |
420 ("{\\\\'u}" "ú") | |
421 ("{\\\\^u}" "û") | |
422 ("{\\\\\"A}" "Ä") | |
423 ("{\\\\`A}" "À") | |
424 ("{\\\\'A}" "Á") | |
425 ("{\\\\~A}" "Ã") | |
426 ("{\\\\^A}" "Â") | |
427 ("{\\\\\"E}" "Ë") | |
428 ("{\\\\`E}" "È") | |
429 ("{\\\\'E}" "É") | |
430 ("{\\\\^E}" "Ê") | |
431 ("{\\\\\"I}" "Ï") | |
432 ("{\\\\`I}" "Ì") | |
433 ("{\\\\'I}" "Í") | |
434 ("{\\\\^I}" "Î") | |
435 ("{\\\\\"O}" "Ö") | |
436 ("{\\\\`O}" "Ò") | |
437 ("{\\\\'O}" "Ó") | |
438 ("{\\\\~O}" "Õ") | |
439 ("{\\\\^O}" "Ô") | |
440 ("{\\\\\"U}" "Ü") | |
441 ("{\\\\`U}" "Ù") | |
442 ("{\\\\'U}" "Ú") | |
443 ("{\\\\^U}" "Û") | |
444 ("{\\\\~n}" "ñ") | |
445 ("{\\\\~N}" "Ñ") | |
446 ("{\\\\c c}" "ç") | |
447 ("{\\\\c C}" "Ç") | |
7861
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 ("\\\\`a" "à") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
450 ("\\\\'a" "á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
451 ("\\\\~a" "ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
452 ("\\\\^a" "â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
453 ("\\\\\"e" "ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
454 ("\\\\`e" "è") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
455 ("\\\\'e" "é") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
456 ("\\\\^e" "ê") |
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 ("\\\\\"i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
462 ("\\\\`i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
463 ("\\\\'i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
464 ("\\\\^i" "î") |
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 ("\\\\`o" "ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
467 ("\\\\'o" "ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
468 ("\\\\~o" "õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
469 ("\\\\^o" "ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
470 ("\\\\\"u" "ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
471 ("\\\\`u" "ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
472 ("\\\\'u" "ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
473 ("\\\\^u" "û") |
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 ("\\\\`A" "À") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
476 ("\\\\'A" "Á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
477 ("\\\\~A" "Ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
478 ("\\\\^A" "Â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
479 ("\\\\\"E" "Ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
480 ("\\\\`E" "È") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
481 ("\\\\'E" "É") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
482 ("\\\\^E" "Ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
483 ("\\\\\"I" "Ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
484 ("\\\\`I" "Ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
485 ("\\\\'I" "Í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
486 ("\\\\^I" "Î") |
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 ("\\\\`O" "Ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
489 ("\\\\'O" "Ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
490 ("\\\\~O" "Õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
491 ("\\\\^O" "Ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
492 ("\\\\\"U" "Ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
493 ("\\\\`U" "Ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
494 ("\\\\'U" "Ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
495 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
496 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
497 ("\\\\~N" "Ñ") |
7260 | 498 ("\\\\\"{a}" "ä") |
499 ("\\\\`{a}" "à") | |
500 ("\\\\'{a}" "á") | |
501 ("\\\\~{a}" "ã") | |
502 ("\\\\^{a}" "â") | |
503 ("\\\\\"{e}" "ë") | |
504 ("\\\\`{e}" "è") | |
505 ("\\\\'{e}" "é") | |
506 ("\\\\^{e}" "ê") | |
507 ("\\\\\"{\\\\i}" "ï") | |
508 ("\\\\`{\\\\i}" "ì") | |
509 ("\\\\'{\\\\i}" "í") | |
510 ("\\\\^{\\\\i}" "î") | |
511 ("\\\\\"{i}" "ï") | |
512 ("\\\\`{i}" "ì") | |
513 ("\\\\'{i}" "í") | |
514 ("\\\\^{i}" "î") | |
515 ("\\\\\"{o}" "ö") | |
516 ("\\\\`{o}" "ò") | |
517 ("\\\\'{o}" "ó") | |
518 ("\\\\~{o}" "õ") | |
519 ("\\\\^{o}" "ô") | |
520 ("\\\\\"{u}" "ü") | |
521 ("\\\\`{u}" "ù") | |
522 ("\\\\'{u}" "ú") | |
523 ("\\\\^{u}" "û") | |
524 ("\\\\\"{A}" "Ä") | |
525 ("\\\\`{A}" "À") | |
526 ("\\\\'{A}" "Á") | |
527 ("\\\\~{A}" "Ã") | |
528 ("\\\\^{A}" "Â") | |
529 ("\\\\\"{E}" "Ë") | |
530 ("\\\\`{E}" "È") | |
531 ("\\\\'{E}" "É") | |
532 ("\\\\^{E}" "Ê") | |
533 ("\\\\\"{I}" "Ï") | |
534 ("\\\\`{I}" "Ì") | |
535 ("\\\\'{I}" "Í") | |
536 ("\\\\^{I}" "Î") | |
537 ("\\\\\"{O}" "Ö") | |
538 ("\\\\`{O}" "Ò") | |
539 ("\\\\'{O}" "Ó") | |
540 ("\\\\~{O}" "Õ") | |
541 ("\\\\^{O}" "Ô") | |
542 ("\\\\\"{U}" "Ü") | |
543 ("\\\\`{U}" "Ù") | |
544 ("\\\\'{U}" "Ú") | |
545 ("\\\\^{U}" "Û") | |
546 ("\\\\~{n}" "ñ") | |
547 ("\\\\~{N}" "Ñ") | |
548 ("\\\\c{c}" "ç") | |
549 ("\\\\c{C}" "Ç") | |
550 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
551 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
552 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
553 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
554 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
555 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
556 ("\\\\copyright{}" "\251") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
557 ("{\\\\pounds}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
558 ("{\\\\P}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
559 ("{\\\\S}" "§" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
560 ("\\\\pounds{}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
561 ("\\\\P{}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
562 ("\\\\S{}" "§" ) |
7260 | 563 ("?`" "¿") |
564 ("!`" "¡") | |
565 ("{?`}" "¿") | |
566 ("{!`}" "¡") | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
567 ("\"a" "ä") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
568 ("\"A" "Ä") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
569 ("\"o" "ö") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
570 ("\"O" "Ö") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
571 ("\"u" "ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
572 ("\"U" "Ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
573 ("\"s" "ß") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
574 ("\\\\3" "ß") |
7260 | 575 ) |
576 "Translation table for translating German TeX sequences to ISO 8859-1. | |
577 This table is not exhaustive (and due to TeX's power can never be). It only | |
578 contains commonly used sequences.") | |
579 | |
580 (defvar iso-iso2gtex-trans-tab | |
581 '( | |
582 ("ä" "\"a") | |
583 ("à" "{\\\\`a}") | |
584 ("á" "{\\\\'a}") | |
585 ("ã" "{\\\\~a}") | |
586 ("â" "{\\\\^a}") | |
587 ("ë" "{\\\\\"e}") | |
588 ("è" "{\\\\`e}") | |
589 ("é" "{\\\\'e}") | |
590 ("ê" "{\\\\^e}") | |
591 ("ï" "{\\\\\"\\\\i}") | |
592 ("ì" "{\\\\`\\\\i}") | |
593 ("í" "{\\\\'\\\\i}") | |
594 ("î" "{\\\\^\\\\i}") | |
595 ("ö" "\"o") | |
596 ("ò" "{\\\\`o}") | |
597 ("ó" "{\\\\'o}") | |
598 ("õ" "{\\\\~o}") | |
599 ("ô" "{\\\\^o}") | |
600 ("ü" "\"u") | |
601 ("ù" "{\\\\`u}") | |
602 ("ú" "{\\\\'u}") | |
603 ("û" "{\\\\^u}") | |
604 ("Ä" "\"A") | |
605 ("À" "{\\\\`A}") | |
606 ("Á" "{\\\\'A}") | |
607 ("Ã" "{\\\\~A}") | |
608 ("Â" "{\\\\^A}") | |
609 ("Ë" "{\\\\\"E}") | |
610 ("È" "{\\\\`E}") | |
611 ("É" "{\\\\'E}") | |
612 ("Ê" "{\\\\^E}") | |
613 ("Ï" "{\\\\\"I}") | |
614 ("Ì" "{\\\\`I}") | |
615 ("Í" "{\\\\'I}") | |
616 ("Î" "{\\\\^I}") | |
617 ("Ö" "\"O") | |
618 ("Ò" "{\\\\`O}") | |
619 ("Ó" "{\\\\'O}") | |
620 ("Õ" "{\\\\~O}") | |
621 ("Ô" "{\\\\^O}") | |
622 ("Ü" "\"U") | |
623 ("Ù" "{\\\\`U}") | |
624 ("Ú" "{\\\\'U}") | |
625 ("Û" "{\\\\^U}") | |
626 ("ñ" "{\\\\~n}") | |
627 ("Ñ" "{\\\\~N}") | |
628 ("ç" "{\\\\c c}") | |
629 ("Ç" "{\\\\c C}") | |
630 ("ß" "\"s") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
631 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
632 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
633 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
634 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
635 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
636 ("£" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
637 ("¶" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
638 ("§" "{\\\\S}") |
7260 | 639 ("¿" "{?`}") |
640 ("¡" "{!`}") | |
641 ) | |
642 "Translation table for translating ISO 8859-1 characters to German TeX.") | |
643 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
644 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
645 (defun iso-gtex2iso (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
646 "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
|
647 The region between FROM and TO is translated using the table TRANS-TAB. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
648 Optional arg BUFFER is ignored (so that the function can can be used in |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
649 `format-alist')." |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
650 (interactive "*r") |
18228 | 651 (iso-translate-conventions from to iso-gtex2iso-trans-tab)) |
7260 | 652 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
653 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
654 (defun iso-iso2gtex (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
655 "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
|
656 The region between FROM and TO is translated using the table TRANS-TAB. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
657 Optional arg BUFFER is ignored (so that the function can can be used in |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
658 `format-alist')." |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
659 (interactive "*r") |
18228 | 660 (iso-translate-conventions from to iso-iso2gtex-trans-tab)) |
661 | |
662 (defvar iso-iso2duden-trans-tab | |
663 '(("ä" "ae") | |
664 ("Ä" "Ae") | |
665 ("ö" "oe") | |
666 ("Ö" "Oe") | |
667 ("ü" "ue") | |
668 ("Ü" "Ue") | |
669 ("ß" "ss"))) | |
670 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
671 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
672 (defun iso-iso2duden (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
673 "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
|
674 The region between FROM and TO is translated using the table TRANS-TAB. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
675 Optional arg BUFFER is ignored (so that the function can can be used in |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
676 `format-alist')." |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
677 (interactive "*r") |
18228 | 678 (iso-translate-conventions from to iso-iso2duden-trans-tab)) |
7260 | 679 |
28393 | 680 (defvar iso-iso2sgml-trans-tab |
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 ("ú" "ú") | |
738 ("û" "û") | |
739 ("ü" "ü") | |
740 ("ý" "ý") | |
741 ("þ" "þ") | |
742 ("ÿ" "ÿ"))) | |
743 | |
744 (defvar iso-sgml2iso-trans-tab | |
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 ("ú" "ú") | |
802 ("û" "û") | |
803 ("ü" "ü") | |
804 ("ý" "ý") | |
805 ("þ" "þ") | |
806 ("ÿ" "ÿ"))) | |
807 | |
808 ;;;###autoload | |
809 (defun iso-iso2sgml (from to &optional buffer) | |
810 "Translate ISO 8859-1 characters in the region to SGML entities. | |
811 The entities used are from \"ISO 8879:1986//ENTITIES Added Latin 1//EN\". | |
812 Optional arg BUFFER is ignored (so that the function can can be used in | |
813 `format-alist')." | |
814 (interactive "*r") | |
815 (iso-translate-conventions from to iso-iso2sgml-trans-tab)) | |
816 | |
817 ;;;###autoload | |
818 (defun iso-sgml2iso (from to &optional buffer) | |
819 "Translate SGML entities in the region to ISO 8859-1 characters. | |
820 The entities used are from \"ISO 8879:1986//ENTITIES Added Latin 1//EN\". | |
821 Optional arg BUFFER is ignored (so that the function can can be used in | |
822 `format-alist')." | |
823 (interactive "*r") | |
824 (iso-translate-conventions from to iso-sgml2iso-trans-tab)) | |
825 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
826 ;;;###autoload |
18228 | 827 (defun iso-cvt-read-only () |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
828 "Warn that format is read-only." |
18228 | 829 (interactive) |
830 (error "This format is read-only; specify another format for writing")) | |
831 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
832 ;;;###autoload |
18228 | 833 (defun iso-cvt-write-only () |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
834 "Warn that format is write-only." |
18228 | 835 (interactive) |
836 (error "This format is write-only")) | |
837 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
838 ;;;###autoload |
18228 | 839 (defun iso-cvt-define-menu () |
840 "Add submenus to the Files menu, to convert to and from various formats." | |
841 (interactive) | |
842 | |
843 (define-key menu-bar-files-menu [load-as-separator] '("--")) | |
844 | |
845 (define-key menu-bar-files-menu [load-as] '("Load As..." . load-as)) | |
846 (defvar load-as-menu-map (make-sparse-keymap "Load As...")) | |
847 (fset 'load-as load-as-menu-map) | |
848 | |
849 ;;(define-key menu-bar-files-menu [insert-as] '("Insert As..." . insert-as)) | |
850 (defvar insert-as-menu-map (make-sparse-keymap "Insert As...")) | |
851 (fset 'insert-as insert-as-menu-map) | |
7260 | 852 |
18228 | 853 (define-key menu-bar-files-menu [write-as] '("Write As..." . write-as)) |
854 (defvar write-as-menu-map (make-sparse-keymap "Write As...")) | |
855 (fset 'write-as write-as-menu-map) | |
856 | |
857 (define-key menu-bar-files-menu [translate-separator] '("--")) | |
858 | |
859 (define-key menu-bar-files-menu [translate-to] '("Translate to..." . translate-to)) | |
860 (defvar translate-to-menu-map (make-sparse-keymap "Translate to...")) | |
861 (fset 'translate-to translate-to-menu-map) | |
862 | |
863 (define-key menu-bar-files-menu [translate-from] '("Translate from..." . translate-from)) | |
864 (defvar translate-from-menu-map (make-sparse-keymap "Translate from...")) | |
865 (fset 'translate-from translate-from-menu-map) | |
7260 | 866 |
18228 | 867 (let ((file-types (reverse format-alist)) |
868 name | |
869 str-name) | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
870 (while file-types |
18228 | 871 (setq name (car (car file-types)) |
872 str-name (car (cdr (car file-types))) | |
873 file-types (cdr file-types)) | |
874 (if (stringp str-name) | |
875 (progn | |
876 (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
|
877 (cons str-name |
28393 | 878 `(lambda (file) |
879 (interactive (format "FFind file (as %s): " ,name)) | |
880 (format-find-file file ',name)))) | |
18228 | 881 (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
|
882 (cons str-name |
28393 | 883 `(lambda (file) |
884 (interactive (format "FInsert file (as %s): " ,name)) | |
885 (format-insert-file file ',name)))) | |
18228 | 886 (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
|
887 (cons str-name |
28393 | 888 `(lambda (file) |
889 (interactive (format "FWrite file (as %s): " ,name)) | |
890 (format-write-file file ',name)))) | |
18228 | 891 (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
|
892 (cons str-name |
28393 | 893 `(lambda () |
894 (interactive) | |
895 (format-encode-buffer ',name)))) | |
18228 | 896 (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
|
897 (cons str-name |
28393 | 898 `(lambda () |
899 (interactive) | |
900 (format-decode-buffer ',name))))))))) | |
901 | |
902 (provide 'iso-cvt) | |
7260 | 903 |
904 ;;; iso-cvt.el ends here |