Mercurial > emacs
annotate lisp/international/iso-cvt.el @ 73232:5f8a28d018b2
(compile_pattern): Only check `cp->syntax_table' if needed.
(compile_pattern_1): Remember `used_syntax' in `cp->syntax_table'.
(clear_regexp_cache): Only flush those regexps which depend on
a syntax-table.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 03 Oct 2006 13:47:26 +0000 |
parents | 18a818a2ee7c |
children | 43cc94d955c2 f9a65d7ebd29 |
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 | |
62274 | 4 ;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2003, 2004 |
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 |
64085 | 24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
25 ;; Boston, MA 02110-1301, 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" "ê") |
58278
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
268 ;; Discard spaces and/or one EOF after macro \i. |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
269 ;; Converting it back will use braces. |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
270 ("\\\\\"\\\\i *\n\n" "ï\n\n") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
271 ("\\\\\"\\\\i *\n?" "ï") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
272 ("\\\\`\\\\i *\n\n" "ì\n\n") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
273 ("\\\\`\\\\i *\n?" "ì") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
274 ("\\\\'\\\\i *\n\n" "í\n\n") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
275 ("\\\\'\\\\i *\n?" "í") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
276 ("\\\\^\\\\i *\n\n" "î\n\n") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
277 ("\\\\^\\\\i *\n?" "î") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
278 ("\\\\\"i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
279 ("\\\\`i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
280 ("\\\\'i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
281 ("\\\\^i" "î") |
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 ("\\\\`o" "ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
284 ("\\\\'o" "ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
285 ("\\\\~o" "õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
286 ("\\\\^o" "ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
287 ("\\\\\"u" "ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
288 ("\\\\`u" "ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
289 ("\\\\'u" "ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
290 ("\\\\^u" "û") |
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 ("\\\\`A" "À") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
293 ("\\\\'A" "Á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
294 ("\\\\~A" "Ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
295 ("\\\\^A" "Â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
296 ("\\\\\"E" "Ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
297 ("\\\\`E" "È") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
298 ("\\\\'E" "É") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
299 ("\\\\^E" "Ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
300 ("\\\\\"I" "Ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
301 ("\\\\`I" "Ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
302 ("\\\\'I" "Í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
303 ("\\\\^I" "Î") |
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 ("\\\\`O" "Ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
306 ("\\\\'O" "Ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
307 ("\\\\~O" "Õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
308 ("\\\\^O" "Ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
309 ("\\\\\"U" "Ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
310 ("\\\\`U" "Ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
311 ("\\\\'U" "Ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
312 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
313 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
314 ("\\\\~N" "Ñ") |
7260 | 315 ("\\\\\"{a}" "ä") |
316 ("\\\\`{a}" "à") | |
317 ("\\\\'{a}" "á") | |
318 ("\\\\~{a}" "ã") | |
319 ("\\\\^{a}" "â") | |
320 ("\\\\\"{e}" "ë") | |
321 ("\\\\`{e}" "è") | |
322 ("\\\\'{e}" "é") | |
323 ("\\\\^{e}" "ê") | |
324 ("\\\\\"{\\\\i}" "ï") | |
325 ("\\\\`{\\\\i}" "ì") | |
326 ("\\\\'{\\\\i}" "í") | |
327 ("\\\\^{\\\\i}" "î") | |
328 ("\\\\\"{i}" "ï") | |
329 ("\\\\`{i}" "ì") | |
330 ("\\\\'{i}" "í") | |
331 ("\\\\^{i}" "î") | |
332 ("\\\\\"{o}" "ö") | |
333 ("\\\\`{o}" "ò") | |
334 ("\\\\'{o}" "ó") | |
335 ("\\\\~{o}" "õ") | |
336 ("\\\\^{o}" "ô") | |
337 ("\\\\\"{u}" "ü") | |
338 ("\\\\`{u}" "ù") | |
339 ("\\\\'{u}" "ú") | |
340 ("\\\\^{u}" "û") | |
341 ("\\\\\"{A}" "Ä") | |
342 ("\\\\`{A}" "À") | |
343 ("\\\\'{A}" "Á") | |
344 ("\\\\~{A}" "Ã") | |
345 ("\\\\^{A}" "Â") | |
346 ("\\\\\"{E}" "Ë") | |
347 ("\\\\`{E}" "È") | |
348 ("\\\\'{E}" "É") | |
349 ("\\\\^{E}" "Ê") | |
350 ("\\\\\"{I}" "Ï") | |
351 ("\\\\`{I}" "Ì") | |
352 ("\\\\'{I}" "Í") | |
353 ("\\\\^{I}" "Î") | |
354 ("\\\\\"{O}" "Ö") | |
355 ("\\\\`{O}" "Ò") | |
356 ("\\\\'{O}" "Ó") | |
357 ("\\\\~{O}" "Õ") | |
358 ("\\\\^{O}" "Ô") | |
359 ("\\\\\"{U}" "Ü") | |
360 ("\\\\`{U}" "Ù") | |
361 ("\\\\'{U}" "Ú") | |
362 ("\\\\^{U}" "Û") | |
363 ("\\\\~{n}" "ñ") | |
364 ("\\\\~{N}" "Ñ") | |
365 ("\\\\c{c}" "ç") | |
366 ("\\\\c{C}" "Ç") | |
367 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
368 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
369 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
370 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
371 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
372 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
373 ("\\\\copyright{}" "\251") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
374 ("{\\\\pounds}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
375 ("{\\\\P}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
376 ("{\\\\S}" "§" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
377 ("\\\\pounds{}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
378 ("\\\\P{}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
379 ("\\\\S{}" "§" ) |
8538
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
380 ("{\\?`}" "¿") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
381 ("{!`}" "¡") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
382 ("\\?`" "¿") |
7260 | 383 ("!`" "¡") |
384 ) | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
385 "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
|
386 This table is not exhaustive (and due to TeX's power can never be). It only |
7260 | 387 contains commonly used sequences.") |
388 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
389 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
390 (defun iso-tex2iso (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
391 "Translate TeX sequences to ISO 8859-1 characters. |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
392 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
|
393 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
|
394 (interactive "*r") |
18228 | 395 (iso-translate-conventions from to iso-tex2iso-trans-tab)) |
7260 | 396 |
397 (defvar iso-gtex2iso-trans-tab | |
398 '( | |
399 ("{\\\\\"a}" "ä") | |
400 ("{\\\\`a}" "à") | |
401 ("{\\\\'a}" "á") | |
402 ("{\\\\~a}" "ã") | |
403 ("{\\\\^a}" "â") | |
404 ("{\\\\\"e}" "ë") | |
405 ("{\\\\`e}" "è") | |
406 ("{\\\\'e}" "é") | |
407 ("{\\\\^e}" "ê") | |
408 ("{\\\\\"\\\\i}" "ï") | |
409 ("{\\\\`\\\\i}" "ì") | |
410 ("{\\\\'\\\\i}" "í") | |
411 ("{\\\\^\\\\i}" "î") | |
412 ("{\\\\\"i}" "ï") | |
413 ("{\\\\`i}" "ì") | |
414 ("{\\\\'i}" "í") | |
415 ("{\\\\^i}" "î") | |
416 ("{\\\\\"o}" "ö") | |
417 ("{\\\\`o}" "ò") | |
418 ("{\\\\'o}" "ó") | |
419 ("{\\\\~o}" "õ") | |
420 ("{\\\\^o}" "ô") | |
421 ("{\\\\\"u}" "ü") | |
422 ("{\\\\`u}" "ù") | |
423 ("{\\\\'u}" "ú") | |
424 ("{\\\\^u}" "û") | |
425 ("{\\\\\"A}" "Ä") | |
426 ("{\\\\`A}" "À") | |
427 ("{\\\\'A}" "Á") | |
428 ("{\\\\~A}" "Ã") | |
429 ("{\\\\^A}" "Â") | |
430 ("{\\\\\"E}" "Ë") | |
431 ("{\\\\`E}" "È") | |
432 ("{\\\\'E}" "É") | |
433 ("{\\\\^E}" "Ê") | |
434 ("{\\\\\"I}" "Ï") | |
435 ("{\\\\`I}" "Ì") | |
436 ("{\\\\'I}" "Í") | |
437 ("{\\\\^I}" "Î") | |
438 ("{\\\\\"O}" "Ö") | |
439 ("{\\\\`O}" "Ò") | |
440 ("{\\\\'O}" "Ó") | |
441 ("{\\\\~O}" "Õ") | |
442 ("{\\\\^O}" "Ô") | |
443 ("{\\\\\"U}" "Ü") | |
444 ("{\\\\`U}" "Ù") | |
445 ("{\\\\'U}" "Ú") | |
446 ("{\\\\^U}" "Û") | |
447 ("{\\\\~n}" "ñ") | |
448 ("{\\\\~N}" "Ñ") | |
449 ("{\\\\c c}" "ç") | |
450 ("{\\\\c C}" "Ç") | |
7861
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 ("\\\\'a" "á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
454 ("\\\\~a" "ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
455 ("\\\\^a" "â") |
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 ("\\\\`e" "è") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
458 ("\\\\'e" "é") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
459 ("\\\\^e" "ê") |
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 ("\\\\`i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
466 ("\\\\'i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
467 ("\\\\^i" "î") |
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 ("\\\\'o" "ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
471 ("\\\\~o" "õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
472 ("\\\\^o" "ô") |
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 ("\\\\`u" "ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
475 ("\\\\'u" "ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
476 ("\\\\^u" "û") |
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 ("\\\\'A" "Á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
480 ("\\\\~A" "Ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
481 ("\\\\^A" "Â") |
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 ("\\\\`E" "È") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
484 ("\\\\'E" "É") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
485 ("\\\\^E" "Ê") |
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 ("\\\\`I" "Ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
488 ("\\\\'I" "Í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
489 ("\\\\^I" "Î") |
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 ("\\\\'O" "Ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
493 ("\\\\~O" "Õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
494 ("\\\\^O" "Ô") |
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 ("\\\\`U" "Ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
497 ("\\\\'U" "Ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
498 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
499 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
500 ("\\\\~N" "Ñ") |
7260 | 501 ("\\\\\"{a}" "ä") |
502 ("\\\\`{a}" "à") | |
503 ("\\\\'{a}" "á") | |
504 ("\\\\~{a}" "ã") | |
505 ("\\\\^{a}" "â") | |
506 ("\\\\\"{e}" "ë") | |
507 ("\\\\`{e}" "è") | |
508 ("\\\\'{e}" "é") | |
509 ("\\\\^{e}" "ê") | |
510 ("\\\\\"{\\\\i}" "ï") | |
511 ("\\\\`{\\\\i}" "ì") | |
512 ("\\\\'{\\\\i}" "í") | |
513 ("\\\\^{\\\\i}" "î") | |
514 ("\\\\\"{i}" "ï") | |
515 ("\\\\`{i}" "ì") | |
516 ("\\\\'{i}" "í") | |
517 ("\\\\^{i}" "î") | |
518 ("\\\\\"{o}" "ö") | |
519 ("\\\\`{o}" "ò") | |
520 ("\\\\'{o}" "ó") | |
521 ("\\\\~{o}" "õ") | |
522 ("\\\\^{o}" "ô") | |
523 ("\\\\\"{u}" "ü") | |
524 ("\\\\`{u}" "ù") | |
525 ("\\\\'{u}" "ú") | |
526 ("\\\\^{u}" "û") | |
527 ("\\\\\"{A}" "Ä") | |
528 ("\\\\`{A}" "À") | |
529 ("\\\\'{A}" "Á") | |
530 ("\\\\~{A}" "Ã") | |
531 ("\\\\^{A}" "Â") | |
532 ("\\\\\"{E}" "Ë") | |
533 ("\\\\`{E}" "È") | |
534 ("\\\\'{E}" "É") | |
535 ("\\\\^{E}" "Ê") | |
536 ("\\\\\"{I}" "Ï") | |
537 ("\\\\`{I}" "Ì") | |
538 ("\\\\'{I}" "Í") | |
539 ("\\\\^{I}" "Î") | |
540 ("\\\\\"{O}" "Ö") | |
541 ("\\\\`{O}" "Ò") | |
542 ("\\\\'{O}" "Ó") | |
543 ("\\\\~{O}" "Õ") | |
544 ("\\\\^{O}" "Ô") | |
545 ("\\\\\"{U}" "Ü") | |
546 ("\\\\`{U}" "Ù") | |
547 ("\\\\'{U}" "Ú") | |
548 ("\\\\^{U}" "Û") | |
549 ("\\\\~{n}" "ñ") | |
550 ("\\\\~{N}" "Ñ") | |
551 ("\\\\c{c}" "ç") | |
552 ("\\\\c{C}" "Ç") | |
553 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
554 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
555 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
556 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
557 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
558 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
559 ("\\\\copyright{}" "\251") |
10081
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}" "§" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
563 ("\\\\pounds{}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
564 ("\\\\P{}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
565 ("\\\\S{}" "§" ) |
7260 | 566 ("?`" "¿") |
567 ("!`" "¡") | |
568 ("{?`}" "¿") | |
569 ("{!`}" "¡") | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
570 ("\"a" "ä") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
571 ("\"A" "Ä") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
572 ("\"o" "ö") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
573 ("\"O" "Ö") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
574 ("\"u" "ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
575 ("\"U" "Ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
576 ("\"s" "ß") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
577 ("\\\\3" "ß") |
7260 | 578 ) |
579 "Translation table for translating German TeX sequences to ISO 8859-1. | |
580 This table is not exhaustive (and due to TeX's power can never be). It only | |
581 contains commonly used sequences.") | |
582 | |
583 (defvar iso-iso2gtex-trans-tab | |
584 '( | |
585 ("ä" "\"a") | |
586 ("à" "{\\\\`a}") | |
587 ("á" "{\\\\'a}") | |
588 ("ã" "{\\\\~a}") | |
589 ("â" "{\\\\^a}") | |
590 ("ë" "{\\\\\"e}") | |
591 ("è" "{\\\\`e}") | |
592 ("é" "{\\\\'e}") | |
593 ("ê" "{\\\\^e}") | |
594 ("ï" "{\\\\\"\\\\i}") | |
595 ("ì" "{\\\\`\\\\i}") | |
596 ("í" "{\\\\'\\\\i}") | |
597 ("î" "{\\\\^\\\\i}") | |
598 ("ö" "\"o") | |
599 ("ò" "{\\\\`o}") | |
600 ("ó" "{\\\\'o}") | |
601 ("õ" "{\\\\~o}") | |
602 ("ô" "{\\\\^o}") | |
603 ("ü" "\"u") | |
604 ("ù" "{\\\\`u}") | |
605 ("ú" "{\\\\'u}") | |
606 ("û" "{\\\\^u}") | |
607 ("Ä" "\"A") | |
608 ("À" "{\\\\`A}") | |
609 ("Á" "{\\\\'A}") | |
610 ("Ã" "{\\\\~A}") | |
611 ("Â" "{\\\\^A}") | |
612 ("Ë" "{\\\\\"E}") | |
613 ("È" "{\\\\`E}") | |
614 ("É" "{\\\\'E}") | |
615 ("Ê" "{\\\\^E}") | |
616 ("Ï" "{\\\\\"I}") | |
617 ("Ì" "{\\\\`I}") | |
618 ("Í" "{\\\\'I}") | |
619 ("Î" "{\\\\^I}") | |
620 ("Ö" "\"O") | |
621 ("Ò" "{\\\\`O}") | |
622 ("Ó" "{\\\\'O}") | |
623 ("Õ" "{\\\\~O}") | |
624 ("Ô" "{\\\\^O}") | |
625 ("Ü" "\"U") | |
626 ("Ù" "{\\\\`U}") | |
627 ("Ú" "{\\\\'U}") | |
628 ("Û" "{\\\\^U}") | |
629 ("ñ" "{\\\\~n}") | |
630 ("Ñ" "{\\\\~N}") | |
631 ("ç" "{\\\\c c}") | |
632 ("Ç" "{\\\\c C}") | |
633 ("ß" "\"s") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
634 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
635 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
636 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
637 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
638 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
639 ("£" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
640 ("¶" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
641 ("§" "{\\\\S}") |
7260 | 642 ("¿" "{?`}") |
643 ("¡" "{!`}") | |
644 ) | |
645 "Translation table for translating ISO 8859-1 characters to German TeX.") | |
646 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
647 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
648 (defun iso-gtex2iso (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
649 "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
|
650 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
|
651 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
|
652 (interactive "*r") |
18228 | 653 (iso-translate-conventions from to iso-gtex2iso-trans-tab)) |
7260 | 654 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
655 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
656 (defun iso-iso2gtex (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
657 "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
|
658 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
|
659 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
|
660 (interactive "*r") |
18228 | 661 (iso-translate-conventions from to iso-iso2gtex-trans-tab)) |
662 | |
663 (defvar iso-iso2duden-trans-tab | |
664 '(("ä" "ae") | |
665 ("Ä" "Ae") | |
666 ("ö" "oe") | |
667 ("Ö" "Oe") | |
668 ("ü" "ue") | |
669 ("Ü" "Ue") | |
670 ("ß" "ss"))) | |
671 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
672 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
673 (defun iso-iso2duden (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
674 "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
|
675 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
|
676 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
|
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 ("ñ" "ñ") | |
63102
608496528c29
(iso-sgml2iso-trans-tab): Add NBSP.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
62274
diff
changeset
|
794 (" " " ") |
28393 | 795 ("ò" "ò") |
796 ("ó" "ó") | |
797 ("ô" "ô") | |
798 ("õ" "õ") | |
799 ("ö" "ö") | |
800 ("ø" "ø") | |
801 ("ù" "ù") | |
802 ("ú" "ú") | |
803 ("û" "û") | |
804 ("ü" "ü") | |
805 ("ý" "ý") | |
806 ("þ" "þ") | |
807 ("ÿ" "ÿ"))) | |
808 | |
809 ;;;###autoload | |
810 (defun iso-iso2sgml (from to &optional buffer) | |
811 "Translate ISO 8859-1 characters in the region to SGML entities. | |
812 The entities used are from \"ISO 8879:1986//ENTITIES Added Latin 1//EN\". | |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
813 Optional arg BUFFER is ignored (for use in `format-alist')." |
28393 | 814 (interactive "*r") |
815 (iso-translate-conventions from to iso-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\". | |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
821 Optional arg BUFFER is ignored (for use in `format-alist')." |
28393 | 822 (interactive "*r") |
823 (iso-translate-conventions from to iso-sgml2iso-trans-tab)) | |
824 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
825 ;;;###autoload |
18228 | 826 (defun iso-cvt-read-only () |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
827 "Warn that format is read-only." |
18228 | 828 (interactive) |
829 (error "This format is read-only; specify another format for writing")) | |
830 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
831 ;;;###autoload |
18228 | 832 (defun iso-cvt-write-only () |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
833 "Warn that format is write-only." |
18228 | 834 (interactive) |
835 (error "This format is write-only")) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38436
diff
changeset
|
836 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
837 ;;;###autoload |
18228 | 838 (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
|
839 "Add submenus to the File menu, to convert to and from various formats." |
18228 | 840 (interactive) |
841 | |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
842 (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
|
843 (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
|
844 (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
|
845 (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
|
846 (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
|
847 (menu menu-bar-file-menu)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
848 |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
849 (define-key menu [load-as-separator] '("--")) |
18228 | 850 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
851 (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
|
852 (fset 'iso-cvt-load-as load-as-menu-map) |
7260 | 853 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
854 ;;(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
|
855 (fset 'iso-cvt-insert-as insert-as-menu-map) |
18228 | 856 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
857 (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
|
858 (fset 'iso-cvt-write-as write-as-menu-map) |
18228 | 859 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
860 (define-key menu [translate-separator] '("--")) |
18228 | 861 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
862 (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
|
863 (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
|
864 |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
865 (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
|
866 (fset 'iso-cvt-translate-from translate-from-menu-map) |
7260 | 867 |
58156
f5edf9775fb5
(iso-cvt-define-menu): Fix typo.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58111
diff
changeset
|
868 (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
|
869 (let ((name (car file-type)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
870 (str-name (cadr file-type))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
871 (if (stringp str-name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
872 (progn |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
873 (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
|
874 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
875 `(lambda (file) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
876 (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
|
877 (format-find-file file ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
878 (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
|
879 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
880 `(lambda (file) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
881 (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
|
882 (format-insert-file file ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
883 (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
|
884 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
885 `(lambda (file) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
886 (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
|
887 (format-write-file file ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
888 (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
|
889 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
890 `(lambda () |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
891 (interactive) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
892 (format-encode-buffer ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
893 (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
|
894 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
895 `(lambda () |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
896 (interactive) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
897 (format-decode-buffer ',name)))))))))) |
28393 | 898 |
899 (provide 'iso-cvt) | |
7260 | 900 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
901 ;; arch-tag: 64ae843f-ed0e-43e1-ba50-ffd581b90840 |
7260 | 902 ;;; iso-cvt.el ends here |