Mercurial > emacs
annotate lisp/international/iso-cvt.el @ 58246:db0a801acf33
*** empty log message ***
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Mon, 15 Nov 2004 23:32:33 +0000 |
parents | f5edf9775fb5 |
children | 31a2a9c6a64d cb7f41387eb3 |
rev | line source |
---|---|
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
34753
diff
changeset
|
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 | |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
4 ;; Copyright (C) 1993, 1994, 1995, 1996, 1998, 2000, 2003, 2004 |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
5 ;; Free Software Foundation, Inc. |
7260 | 6 |
7 ;; Author: Michael Gschwind <mike@vlsivie.tuwien.ac.at> | |
8 ;; Keywords: tex, iso, latin, i18n | |
9 | |
10 ;; This file is part of GNU Emacs. | |
11 | |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
13 ;; it under the terms of the GNU General Public License as published by | |
14 ;; the Free Software Foundation; either version 2, or (at your option) | |
15 ;; any later version. | |
16 | |
17 ;; GNU Emacs is distributed in the hope that it will be useful, | |
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 ;; GNU General Public License for more details. | |
21 | |
22 ;; You should have received a copy of the GNU General Public License | |
14169 | 23 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
25 ;; Boston, MA 02111-1307, USA. | |
7260 | 26 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
27 ;;; Commentary: |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
28 ;; This lisp code is a general framework for translating various |
18228 | 29 ;; representations of the same data. |
30 ;; 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
|
31 ;; files to ISO 8859-1. It can also be used to translate different charsets |
18228 | 32 ;; such as IBM PC, Macintosh or HP Roman8. |
33 ;; Note that many translations use the GNU recode tool to do the actual | |
34 ;; conversion. So you might want to install that tool to get the full | |
35 ;; benefit of iso-cvt.el | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
36 |
18228 | 37 ; TO DO: |
28393 | 38 ; Cover more cases for translation. (There is an infinite number of ways to |
18228 | 39 ; represent accented characters in TeX) |
7260 | 40 |
18228 | 41 ;; SEE ALSO: |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
42 ; If you are interested in questions related to using the ISO 8859-1 |
18228 | 43 ; 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
|
44 ; 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
|
45 ; ftp.vlsivie.tuwien.ac.at in /pub/8bit/FAQ-ISO-8859-1 |
7260 | 46 |
47 ;;; Code: | |
48 | |
49 (defvar iso-spanish-trans-tab | |
50 '( | |
51 ("~n" "ñ") | |
52 ("\([a-zA-Z]\)#" "\\1ñ") | |
53 ("~N" "Ñ") | |
54 ("\\([-a-zA-Z\"`]\\)\"u" "\\1ü") | |
55 ("\\([-a-zA-Z\"`]\\)\"U" "\\1Ü") | |
56 ("\\([-a-zA-Z]\\)'o" "\\1ó") | |
57 ("\\([-a-zA-Z]\\)'O" "\\Ó") | |
58 ("\\([-a-zA-Z]\\)'e" "\\1é") | |
59 ("\\([-a-zA-Z]\\)'E" "\\1É") | |
60 ("\\([-a-zA-Z]\\)'a" "\\1á") | |
61 ("\\([-a-zA-Z]\\)'A" "\\1A") | |
62 ("\\([-a-zA-Z]\\)'i" "\\1í") | |
63 ("\\([-a-zA-Z]\\)'I" "\\1Í") | |
64 ) | |
65 "Spanish translation table.") | |
66 | |
18228 | 67 (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
|
68 "Use the translation table TRANS-TAB to translate the current buffer." |
7260 | 69 (save-excursion |
18228 | 70 (save-restriction |
71 (narrow-to-region from to) | |
72 (goto-char from) | |
73 (let ((work-tab trans-tab) | |
74 (buffer-read-only nil) | |
75 (case-fold-search nil)) | |
76 (while work-tab | |
77 (save-excursion | |
78 (let ((trans-this (car work-tab))) | |
79 (while (re-search-forward (car trans-this) nil t) | |
80 (replace-match (car (cdr trans-this)) t nil))) | |
81 (setq work-tab (cdr work-tab))))) | |
82 (point-max)))) | |
7260 | 83 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
84 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
85 (defun iso-spanish (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
86 "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
|
87 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
|
88 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
|
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. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
129 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
|
130 (interactive "*r") |
18228 | 131 (iso-translate-conventions from to iso-german-trans-tab)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38436
diff
changeset
|
132 |
7260 | 133 (defvar iso-iso2tex-trans-tab |
134 '( | |
135 ("ä" "{\\\\\"a}") | |
136 ("à" "{\\\\`a}") | |
137 ("á" "{\\\\'a}") | |
138 ("ã" "{\\\\~a}") | |
139 ("â" "{\\\\^a}") | |
140 ("ë" "{\\\\\"e}") | |
141 ("è" "{\\\\`e}") | |
142 ("é" "{\\\\'e}") | |
143 ("ê" "{\\\\^e}") | |
144 ("ï" "{\\\\\"\\\\i}") | |
145 ("ì" "{\\\\`\\\\i}") | |
146 ("í" "{\\\\'\\\\i}") | |
147 ("î" "{\\\\^\\\\i}") | |
148 ("ö" "{\\\\\"o}") | |
149 ("ò" "{\\\\`o}") | |
150 ("ó" "{\\\\'o}") | |
151 ("õ" "{\\\\~o}") | |
152 ("ô" "{\\\\^o}") | |
153 ("ü" "{\\\\\"u}") | |
154 ("ù" "{\\\\`u}") | |
155 ("ú" "{\\\\'u}") | |
156 ("û" "{\\\\^u}") | |
157 ("Ä" "{\\\\\"A}") | |
158 ("À" "{\\\\`A}") | |
159 ("Á" "{\\\\'A}") | |
160 ("Ã" "{\\\\~A}") | |
161 ("Â" "{\\\\^A}") | |
162 ("Ë" "{\\\\\"E}") | |
163 ("È" "{\\\\`E}") | |
164 ("É" "{\\\\'E}") | |
165 ("Ê" "{\\\\^E}") | |
166 ("Ï" "{\\\\\"I}") | |
167 ("Ì" "{\\\\`I}") | |
168 ("Í" "{\\\\'I}") | |
169 ("Î" "{\\\\^I}") | |
170 ("Ö" "{\\\\\"O}") | |
171 ("Ò" "{\\\\`O}") | |
172 ("Ó" "{\\\\'O}") | |
173 ("Õ" "{\\\\~O}") | |
174 ("Ô" "{\\\\^O}") | |
175 ("Ü" "{\\\\\"U}") | |
176 ("Ù" "{\\\\`U}") | |
177 ("Ú" "{\\\\'U}") | |
178 ("Û" "{\\\\^U}") | |
179 ("ñ" "{\\\\~n}") | |
180 ("Ñ" "{\\\\~N}") | |
181 ("ç" "{\\\\c c}") | |
182 ("Ç" "{\\\\c C}") | |
183 ("ß" "{\\\\ss}") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
184 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
185 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
186 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
187 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
188 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
189 ("£" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
190 ("¶" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
191 ("§" "{\\\\S}") |
7260 | 192 ("¿" "{?`}") |
193 ("¡" "{!`}") | |
194 ) | |
195 "Translation table for translating ISO 8859-1 characters to TeX sequences.") | |
196 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
197 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
198 (defun iso-iso2tex (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
199 "Translate ISO 8859-1 characters to TeX sequences. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
200 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
|
201 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
|
202 (interactive "*r") |
18228 | 203 (iso-translate-conventions from to iso-iso2tex-trans-tab)) |
7260 | 204 |
205 (defvar iso-tex2iso-trans-tab | |
206 '( | |
207 ("{\\\\\"a}" "ä") | |
208 ("{\\\\`a}" "à") | |
209 ("{\\\\'a}" "á") | |
210 ("{\\\\~a}" "ã") | |
211 ("{\\\\^a}" "â") | |
212 ("{\\\\\"e}" "ë") | |
213 ("{\\\\`e}" "è") | |
214 ("{\\\\'e}" "é") | |
215 ("{\\\\^e}" "ê") | |
216 ("{\\\\\"\\\\i}" "ï") | |
217 ("{\\\\`\\\\i}" "ì") | |
218 ("{\\\\'\\\\i}" "í") | |
219 ("{\\\\^\\\\i}" "î") | |
220 ("{\\\\\"i}" "ï") | |
221 ("{\\\\`i}" "ì") | |
222 ("{\\\\'i}" "í") | |
223 ("{\\\\^i}" "î") | |
224 ("{\\\\\"o}" "ö") | |
225 ("{\\\\`o}" "ò") | |
226 ("{\\\\'o}" "ó") | |
227 ("{\\\\~o}" "õ") | |
228 ("{\\\\^o}" "ô") | |
229 ("{\\\\\"u}" "ü") | |
230 ("{\\\\`u}" "ù") | |
231 ("{\\\\'u}" "ú") | |
232 ("{\\\\^u}" "û") | |
233 ("{\\\\\"A}" "Ä") | |
234 ("{\\\\`A}" "À") | |
235 ("{\\\\'A}" "Á") | |
236 ("{\\\\~A}" "Ã") | |
237 ("{\\\\^A}" "Â") | |
238 ("{\\\\\"E}" "Ë") | |
239 ("{\\\\`E}" "È") | |
240 ("{\\\\'E}" "É") | |
241 ("{\\\\^E}" "Ê") | |
242 ("{\\\\\"I}" "Ï") | |
243 ("{\\\\`I}" "Ì") | |
244 ("{\\\\'I}" "Í") | |
245 ("{\\\\^I}" "Î") | |
246 ("{\\\\\"O}" "Ö") | |
247 ("{\\\\`O}" "Ò") | |
248 ("{\\\\'O}" "Ó") | |
249 ("{\\\\~O}" "Õ") | |
250 ("{\\\\^O}" "Ô") | |
251 ("{\\\\\"U}" "Ü") | |
252 ("{\\\\`U}" "Ù") | |
253 ("{\\\\'U}" "Ú") | |
254 ("{\\\\^U}" "Û") | |
255 ("{\\\\~n}" "ñ") | |
256 ("{\\\\~N}" "Ñ") | |
257 ("{\\\\c c}" "ç") | |
258 ("{\\\\c C}" "Ç") | |
7861
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 ("\\\\^a" "â") |
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 ("\\\\^e" "ê") |
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 ("\\\\^i" "î") |
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 ("\\\\^o" "ô") |
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 ("\\\\^u" "û") |
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 ("\\\\^A" "Â") |
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 ("\\\\^E" "Ê") |
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 ("\\\\^I" "Î") |
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 ("\\\\^O" "Ô") |
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 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
307 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
308 ("\\\\~N" "Ñ") |
7260 | 309 ("\\\\\"{a}" "ä") |
310 ("\\\\`{a}" "à") | |
311 ("\\\\'{a}" "á") | |
312 ("\\\\~{a}" "ã") | |
313 ("\\\\^{a}" "â") | |
314 ("\\\\\"{e}" "ë") | |
315 ("\\\\`{e}" "è") | |
316 ("\\\\'{e}" "é") | |
317 ("\\\\^{e}" "ê") | |
318 ("\\\\\"{\\\\i}" "ï") | |
319 ("\\\\`{\\\\i}" "ì") | |
320 ("\\\\'{\\\\i}" "í") | |
321 ("\\\\^{\\\\i}" "î") | |
322 ("\\\\\"{i}" "ï") | |
323 ("\\\\`{i}" "ì") | |
324 ("\\\\'{i}" "í") | |
325 ("\\\\^{i}" "î") | |
326 ("\\\\\"{o}" "ö") | |
327 ("\\\\`{o}" "ò") | |
328 ("\\\\'{o}" "ó") | |
329 ("\\\\~{o}" "õ") | |
330 ("\\\\^{o}" "ô") | |
331 ("\\\\\"{u}" "ü") | |
332 ("\\\\`{u}" "ù") | |
333 ("\\\\'{u}" "ú") | |
334 ("\\\\^{u}" "û") | |
335 ("\\\\\"{A}" "Ä") | |
336 ("\\\\`{A}" "À") | |
337 ("\\\\'{A}" "Á") | |
338 ("\\\\~{A}" "Ã") | |
339 ("\\\\^{A}" "Â") | |
340 ("\\\\\"{E}" "Ë") | |
341 ("\\\\`{E}" "È") | |
342 ("\\\\'{E}" "É") | |
343 ("\\\\^{E}" "Ê") | |
344 ("\\\\\"{I}" "Ï") | |
345 ("\\\\`{I}" "Ì") | |
346 ("\\\\'{I}" "Í") | |
347 ("\\\\^{I}" "Î") | |
348 ("\\\\\"{O}" "Ö") | |
349 ("\\\\`{O}" "Ò") | |
350 ("\\\\'{O}" "Ó") | |
351 ("\\\\~{O}" "Õ") | |
352 ("\\\\^{O}" "Ô") | |
353 ("\\\\\"{U}" "Ü") | |
354 ("\\\\`{U}" "Ù") | |
355 ("\\\\'{U}" "Ú") | |
356 ("\\\\^{U}" "Û") | |
357 ("\\\\~{n}" "ñ") | |
358 ("\\\\~{N}" "Ñ") | |
359 ("\\\\c{c}" "ç") | |
360 ("\\\\c{C}" "Ç") | |
361 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
362 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
363 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
364 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
365 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
366 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
367 ("\\\\copyright{}" "\251") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
368 ("{\\\\pounds}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
369 ("{\\\\P}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
370 ("{\\\\S}" "§" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
371 ("\\\\pounds{}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
372 ("\\\\P{}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
373 ("\\\\S{}" "§" ) |
8538
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 ("{!`}" "¡") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
376 ("\\?`" "¿") |
7260 | 377 ("!`" "¡") |
378 ) | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
379 "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
|
380 This table is not exhaustive (and due to TeX's power can never be). It only |
7260 | 381 contains commonly used sequences.") |
382 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
383 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
384 (defun iso-tex2iso (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
385 "Translate TeX sequences to ISO 8859-1 characters. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
386 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
|
387 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
|
388 (interactive "*r") |
18228 | 389 (iso-translate-conventions from to iso-tex2iso-trans-tab)) |
7260 | 390 |
391 (defvar iso-gtex2iso-trans-tab | |
392 '( | |
393 ("{\\\\\"a}" "ä") | |
394 ("{\\\\`a}" "à") | |
395 ("{\\\\'a}" "á") | |
396 ("{\\\\~a}" "ã") | |
397 ("{\\\\^a}" "â") | |
398 ("{\\\\\"e}" "ë") | |
399 ("{\\\\`e}" "è") | |
400 ("{\\\\'e}" "é") | |
401 ("{\\\\^e}" "ê") | |
402 ("{\\\\\"\\\\i}" "ï") | |
403 ("{\\\\`\\\\i}" "ì") | |
404 ("{\\\\'\\\\i}" "í") | |
405 ("{\\\\^\\\\i}" "î") | |
406 ("{\\\\\"i}" "ï") | |
407 ("{\\\\`i}" "ì") | |
408 ("{\\\\'i}" "í") | |
409 ("{\\\\^i}" "î") | |
410 ("{\\\\\"o}" "ö") | |
411 ("{\\\\`o}" "ò") | |
412 ("{\\\\'o}" "ó") | |
413 ("{\\\\~o}" "õ") | |
414 ("{\\\\^o}" "ô") | |
415 ("{\\\\\"u}" "ü") | |
416 ("{\\\\`u}" "ù") | |
417 ("{\\\\'u}" "ú") | |
418 ("{\\\\^u}" "û") | |
419 ("{\\\\\"A}" "Ä") | |
420 ("{\\\\`A}" "À") | |
421 ("{\\\\'A}" "Á") | |
422 ("{\\\\~A}" "Ã") | |
423 ("{\\\\^A}" "Â") | |
424 ("{\\\\\"E}" "Ë") | |
425 ("{\\\\`E}" "È") | |
426 ("{\\\\'E}" "É") | |
427 ("{\\\\^E}" "Ê") | |
428 ("{\\\\\"I}" "Ï") | |
429 ("{\\\\`I}" "Ì") | |
430 ("{\\\\'I}" "Í") | |
431 ("{\\\\^I}" "Î") | |
432 ("{\\\\\"O}" "Ö") | |
433 ("{\\\\`O}" "Ò") | |
434 ("{\\\\'O}" "Ó") | |
435 ("{\\\\~O}" "Õ") | |
436 ("{\\\\^O}" "Ô") | |
437 ("{\\\\\"U}" "Ü") | |
438 ("{\\\\`U}" "Ù") | |
439 ("{\\\\'U}" "Ú") | |
440 ("{\\\\^U}" "Û") | |
441 ("{\\\\~n}" "ñ") | |
442 ("{\\\\~N}" "Ñ") | |
443 ("{\\\\c c}" "ç") | |
444 ("{\\\\c C}" "Ç") | |
7861
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 ("\\\\^a" "â") |
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 ("\\\\^e" "ê") |
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 ("\\\\^i" "î") |
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 ("\\\\^o" "ô") |
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 ("\\\\^u" "û") |
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 ("\\\\^A" "Â") |
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 ("\\\\^E" "Ê") |
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 ("\\\\^I" "Î") |
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 ("\\\\^O" "Ô") |
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 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
493 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
494 ("\\\\~N" "Ñ") |
7260 | 495 ("\\\\\"{a}" "ä") |
496 ("\\\\`{a}" "à") | |
497 ("\\\\'{a}" "á") | |
498 ("\\\\~{a}" "ã") | |
499 ("\\\\^{a}" "â") | |
500 ("\\\\\"{e}" "ë") | |
501 ("\\\\`{e}" "è") | |
502 ("\\\\'{e}" "é") | |
503 ("\\\\^{e}" "ê") | |
504 ("\\\\\"{\\\\i}" "ï") | |
505 ("\\\\`{\\\\i}" "ì") | |
506 ("\\\\'{\\\\i}" "í") | |
507 ("\\\\^{\\\\i}" "î") | |
508 ("\\\\\"{i}" "ï") | |
509 ("\\\\`{i}" "ì") | |
510 ("\\\\'{i}" "í") | |
511 ("\\\\^{i}" "î") | |
512 ("\\\\\"{o}" "ö") | |
513 ("\\\\`{o}" "ò") | |
514 ("\\\\'{o}" "ó") | |
515 ("\\\\~{o}" "õ") | |
516 ("\\\\^{o}" "ô") | |
517 ("\\\\\"{u}" "ü") | |
518 ("\\\\`{u}" "ù") | |
519 ("\\\\'{u}" "ú") | |
520 ("\\\\^{u}" "û") | |
521 ("\\\\\"{A}" "Ä") | |
522 ("\\\\`{A}" "À") | |
523 ("\\\\'{A}" "Á") | |
524 ("\\\\~{A}" "Ã") | |
525 ("\\\\^{A}" "Â") | |
526 ("\\\\\"{E}" "Ë") | |
527 ("\\\\`{E}" "È") | |
528 ("\\\\'{E}" "É") | |
529 ("\\\\^{E}" "Ê") | |
530 ("\\\\\"{I}" "Ï") | |
531 ("\\\\`{I}" "Ì") | |
532 ("\\\\'{I}" "Í") | |
533 ("\\\\^{I}" "Î") | |
534 ("\\\\\"{O}" "Ö") | |
535 ("\\\\`{O}" "Ò") | |
536 ("\\\\'{O}" "Ó") | |
537 ("\\\\~{O}" "Õ") | |
538 ("\\\\^{O}" "Ô") | |
539 ("\\\\\"{U}" "Ü") | |
540 ("\\\\`{U}" "Ù") | |
541 ("\\\\'{U}" "Ú") | |
542 ("\\\\^{U}" "Û") | |
543 ("\\\\~{n}" "ñ") | |
544 ("\\\\~{N}" "Ñ") | |
545 ("\\\\c{c}" "ç") | |
546 ("\\\\c{C}" "Ç") | |
547 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
548 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
549 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
550 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
551 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
552 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
553 ("\\\\copyright{}" "\251") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
554 ("{\\\\pounds}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
555 ("{\\\\P}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
556 ("{\\\\S}" "§" ) |
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{}" "§" ) |
7260 | 560 ("?`" "¿") |
561 ("!`" "¡") | |
562 ("{?`}" "¿") | |
563 ("{!`}" "¡") | |
7425
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 ("\"A" "Ä") |
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 ("\"O" "Ö") |
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 ("\"U" "Ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
570 ("\"s" "ß") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
571 ("\\\\3" "ß") |
7260 | 572 ) |
573 "Translation table for translating German TeX sequences to ISO 8859-1. | |
574 This table is not exhaustive (and due to TeX's power can never be). It only | |
575 contains commonly used sequences.") | |
576 | |
577 (defvar iso-iso2gtex-trans-tab | |
578 '( | |
579 ("ä" "\"a") | |
580 ("à" "{\\\\`a}") | |
581 ("á" "{\\\\'a}") | |
582 ("ã" "{\\\\~a}") | |
583 ("â" "{\\\\^a}") | |
584 ("ë" "{\\\\\"e}") | |
585 ("è" "{\\\\`e}") | |
586 ("é" "{\\\\'e}") | |
587 ("ê" "{\\\\^e}") | |
588 ("ï" "{\\\\\"\\\\i}") | |
589 ("ì" "{\\\\`\\\\i}") | |
590 ("í" "{\\\\'\\\\i}") | |
591 ("î" "{\\\\^\\\\i}") | |
592 ("ö" "\"o") | |
593 ("ò" "{\\\\`o}") | |
594 ("ó" "{\\\\'o}") | |
595 ("õ" "{\\\\~o}") | |
596 ("ô" "{\\\\^o}") | |
597 ("ü" "\"u") | |
598 ("ù" "{\\\\`u}") | |
599 ("ú" "{\\\\'u}") | |
600 ("û" "{\\\\^u}") | |
601 ("Ä" "\"A") | |
602 ("À" "{\\\\`A}") | |
603 ("Á" "{\\\\'A}") | |
604 ("Ã" "{\\\\~A}") | |
605 ("Â" "{\\\\^A}") | |
606 ("Ë" "{\\\\\"E}") | |
607 ("È" "{\\\\`E}") | |
608 ("É" "{\\\\'E}") | |
609 ("Ê" "{\\\\^E}") | |
610 ("Ï" "{\\\\\"I}") | |
611 ("Ì" "{\\\\`I}") | |
612 ("Í" "{\\\\'I}") | |
613 ("Î" "{\\\\^I}") | |
614 ("Ö" "\"O") | |
615 ("Ò" "{\\\\`O}") | |
616 ("Ó" "{\\\\'O}") | |
617 ("Õ" "{\\\\~O}") | |
618 ("Ô" "{\\\\^O}") | |
619 ("Ü" "\"U") | |
620 ("Ù" "{\\\\`U}") | |
621 ("Ú" "{\\\\'U}") | |
622 ("Û" "{\\\\^U}") | |
623 ("ñ" "{\\\\~n}") | |
624 ("Ñ" "{\\\\~N}") | |
625 ("ç" "{\\\\c c}") | |
626 ("Ç" "{\\\\c C}") | |
627 ("ß" "\"s") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
628 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
629 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
630 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
631 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
632 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
633 ("£" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
634 ("¶" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
635 ("§" "{\\\\S}") |
7260 | 636 ("¿" "{?`}") |
637 ("¡" "{!`}") | |
638 ) | |
639 "Translation table for translating ISO 8859-1 characters to German TeX.") | |
640 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
641 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
642 (defun iso-gtex2iso (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
643 "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
|
644 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
|
645 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
|
646 (interactive "*r") |
18228 | 647 (iso-translate-conventions from to iso-gtex2iso-trans-tab)) |
7260 | 648 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
649 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
650 (defun iso-iso2gtex (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
651 "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
|
652 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
|
653 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
|
654 (interactive "*r") |
18228 | 655 (iso-translate-conventions from to iso-iso2gtex-trans-tab)) |
656 | |
657 (defvar iso-iso2duden-trans-tab | |
658 '(("ä" "ae") | |
659 ("Ä" "Ae") | |
660 ("ö" "oe") | |
661 ("Ö" "Oe") | |
662 ("ü" "ue") | |
663 ("Ü" "Ue") | |
664 ("ß" "ss"))) | |
665 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
666 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
667 (defun iso-iso2duden (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
668 "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
|
669 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
|
670 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
|
671 (interactive "*r") |
18228 | 672 (iso-translate-conventions from to iso-iso2duden-trans-tab)) |
7260 | 673 |
28393 | 674 (defvar iso-iso2sgml-trans-tab |
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 | |
738 (defvar iso-sgml2iso-trans-tab | |
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 | |
802 ;;;###autoload | |
803 (defun iso-iso2sgml (from to &optional buffer) | |
804 "Translate ISO 8859-1 characters in the region to SGML entities. | |
805 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
|
806 Optional arg BUFFER is ignored (for use in `format-alist')." |
28393 | 807 (interactive "*r") |
808 (iso-translate-conventions from to iso-iso2sgml-trans-tab)) | |
809 | |
810 ;;;###autoload | |
811 (defun iso-sgml2iso (from to &optional buffer) | |
812 "Translate SGML entities in the region to ISO 8859-1 characters. | |
813 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
|
814 Optional arg BUFFER is ignored (for use in `format-alist')." |
28393 | 815 (interactive "*r") |
816 (iso-translate-conventions from to iso-sgml2iso-trans-tab)) | |
817 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
818 ;;;###autoload |
18228 | 819 (defun iso-cvt-read-only () |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
820 "Warn that format is read-only." |
18228 | 821 (interactive) |
822 (error "This format is read-only; specify another format for writing")) | |
823 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
824 ;;;###autoload |
18228 | 825 (defun iso-cvt-write-only () |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
826 "Warn that format is write-only." |
18228 | 827 (interactive) |
828 (error "This format is write-only")) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38436
diff
changeset
|
829 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
830 ;;;###autoload |
18228 | 831 (defun iso-cvt-define-menu () |
58007
a8e3cd5a8156
(iso-cvt-define-menu): menu-bar-files-menu renamed to menu-bar-file-menu.
Richard M. Stallman <rms@gnu.org>
parents:
52401
diff
changeset
|
832 "Add submenus to the File menu, to convert to and from various formats." |
18228 | 833 (interactive) |
834 | |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
835 (let ((load-as-menu-map (make-sparse-keymap "Load As...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
836 (insert-as-menu-map (make-sparse-keymap "Insert As...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
837 (write-as-menu-map (make-sparse-keymap "Write As...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
838 (translate-to-menu-map (make-sparse-keymap "Translate to...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
839 (translate-from-menu-map (make-sparse-keymap "Translate from...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
840 (menu menu-bar-file-menu)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
841 |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
842 (define-key menu [load-as-separator] '("--")) |
18228 | 843 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
844 (define-key menu [load-as] '("Load As..." . iso-cvt-load-as)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
845 (fset 'iso-cvt-load-as load-as-menu-map) |
7260 | 846 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
847 ;;(define-key menu [insert-as] '("Insert As..." . iso-cvt-insert-as)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
848 (fset 'iso-cvt-insert-as insert-as-menu-map) |
18228 | 849 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
850 (define-key menu [write-as] '("Write As..." . iso-cvt-write-as)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
851 (fset 'iso-cvt-write-as write-as-menu-map) |
18228 | 852 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
853 (define-key menu [translate-separator] '("--")) |
18228 | 854 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
855 (define-key menu [translate-to] '("Translate to..." . iso-cvt-translate-to)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
856 (fset 'iso-cvt-translate-to translate-to-menu-map) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
857 |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
858 (define-key menu [translate-from] '("Translate from..." . iso-cvt-translate-from)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
859 (fset 'iso-cvt-translate-from translate-from-menu-map) |
7260 | 860 |
58156
f5edf9775fb5
(iso-cvt-define-menu): Fix typo.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58111
diff
changeset
|
861 (dolist (file-type (reverse format-alist)) |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
862 (let ((name (car file-type)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
863 (str-name (cadr file-type))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
864 (if (stringp str-name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
865 (progn |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
866 (define-key load-as-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
867 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
868 `(lambda (file) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
869 (interactive ,(format "FFind file (as %s): " name)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
870 (format-find-file file ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
871 (define-key insert-as-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
872 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
873 `(lambda (file) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
874 (interactive (format "FInsert file (as %s): " ,name)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
875 (format-insert-file file ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
876 (define-key write-as-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
877 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
878 `(lambda (file) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
879 (interactive (format "FWrite file (as %s): " ,name)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
880 (format-write-file file ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
881 (define-key translate-to-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
882 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
883 `(lambda () |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
884 (interactive) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
885 (format-encode-buffer ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
886 (define-key translate-from-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
887 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
888 `(lambda () |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
889 (interactive) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
890 (format-decode-buffer ',name)))))))))) |
28393 | 891 |
892 (provide 'iso-cvt) | |
7260 | 893 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
894 ;; arch-tag: 64ae843f-ed0e-43e1-ba50-ffd581b90840 |
7260 | 895 ;;; iso-cvt.el ends here |