emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch for `iso-cvt.el'


From: jemarch
Subject: patch for `iso-cvt.el'
Date: Thu, 14 Oct 2004 13:17:12 +0200

Hi.

The following patch add support for texinfo to `iso-cvt.el', in order
to translating ISO 8859-1 specific characters to texinfo sequences,
and back.

It also fixes several documentation strings.


2004-10-14  Jose E. Marchesi  <address@hidden>

        * iso-cvt.el (iso-iso2texi-trans-tab): Translation table for
        translating ISO 8859-1 characters to texinfo sequences.
        (iso-iso2texi): Function to translate ISO 8859-1 characters into
        texinfo sequences.
        (iso-texi2iso-trans-tab): Translation table for translating
        texinfo sequences to ISO 8859-1 characters.
        (iso-spanish): Document string fixed to reflect the translation
        table used by the function.
        (iso-german): idem.
        (iso-iso2tex): idem.
        (iso-tex2iso): idem.
        (iso-gtex2iso): idem.
        (iso-iso2gtex): idem.
        (iso-iso2duden): idem.



Index: lisp/international/iso-cvt.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/iso-cvt.el,v
retrieving revision 1.22
diff -u -r1.22 iso-cvt.el
--- lisp/international/iso-cvt.el       1 Sep 2003 15:45:28 -0000       1.22
+++ lisp/international/iso-cvt.el       14 Oct 2004 11:07:21 -0000
@@ -83,7 +83,7 @@
 ;;;###autoload
 (defun iso-spanish (from to &optional buffer)
   "Translate net conventions for Spanish to ISO 8859-1.
-The region between FROM and TO is translated using the table TRANS-TAB.
+The region between FROM and TO is translated using the table 
`iso-spanish-trans-tab'.
 Optional arg BUFFER is ignored (for use in `format-alist')."
   (interactive "*r")
   (iso-translate-conventions from to iso-spanish-trans-tab))
@@ -124,11 +124,150 @@
 ;;;###autoload
 (defun iso-german (from to &optional buffer)
  "Translate net conventions for German to ISO 8859-1.
-The region between FROM and TO is translated using the table TRANS-TAB.
+The region between FROM and TO is translated using the table 
`iso-german-trans-tab'.
 Optional arg BUFFER is ignored (for use in `format-alist')."
  (interactive "*r")
  (iso-translate-conventions from to iso-german-trans-tab))
 
+
+(defvar iso-iso2texi-trans-tab
+  '(
+    ("ä" "@\"a")
+    ("à" "@`a")
+    ("á" "@'a")
+    ("ã" "@~a")
+    ("â" "@^a")
+    ("ë" "@\"e")
+    ("è" "@`e")
+    ("é" "@'e")
+    ("ê" "@^e")
+    ("ï" "@\"i")
+    ("ì" "@`i")
+    ("í" "@'address@hidden")
+    ("î" "@address@hidden")
+    ("ö" "@\"o")
+    ("ò" "@`o")
+    ("ó" "@'o")
+    ("õ" "@~o")
+    ("ô" "@^o")
+    ("ü" "@\"u")
+    ("ù" "@`u")
+    ("ú" "@'u")
+    ("û" "@^u")
+    ("Ä" "@\"A")
+    ("À" "@`A")
+    ("Á" "@'A")
+    ("Ã" "@~A")
+    ("Â" "@^A")
+    ("Ë" "@\"E")
+    ("È" "@`E")
+    ("É" "@'E")
+    ("Ê" "@^E")
+    ("Ï" "@\"I")
+    ("Ì" "@`I")
+    ("Í" "@'I")
+    ("Î" "@^I")
+    ("Ö" "@\"O")
+    ("Ò" "@`O")
+    ("Ó" "@'O")
+    ("Õ" "@~O")
+    ("Ô" "@^O")
+    ("Ü" "@\"U")
+    ("Ù" "@`U")
+    ("Ú" "@'U")
+    ("Û" "@^U")
+    ("ñ" "@~n")
+    ("Ñ" "@~N")
+    ("ç" "@,{c}")
+    ("Ç" "@,{C}")
+    ("ß" "@ss{}")
+    ("\306" "@AE{}")
+    ("\346" "@ae{}")
+    ("\305" "@AA{}")
+    ("\345" "@aa{}")
+    ("\251" "@copyright{}")
+    ("\330" "@OE{}")
+    ("\370" "@oe{}")
+    ("¿" "@questiondown{}")
+    ("¡" "@exclamdown{}")
+    )
+  "Translation table for translating ISO 8859-1 characters to texinfo 
sequences.")
+
+(defun iso-iso2texi (from to &optional buffer)
+  "Translate ISO 8859-1 characters to texinfo sequences.
+The region between FROM and TO is translated using the table 
`iso-iso2texi-trans-tab'.
+Optional arg BUFFER is ignored (for use in `format-alist')."
+  (interactive "*r")
+  (iso-translate-conventions from to iso-iso2texi-trans-tab))
+
+(defvar iso-texi2iso-trans-tab
+  '(
+    ("@\"a" "ä")
+    ("@`a" "à" )
+    ("@'a" "á" )
+    ("@~a" "ã")
+    ("@^a" "â" )
+    ("@\"e" "ë" )
+    ("@`e" "è" )
+    ("@'e" "é" )
+    ("@^e" "ê" )
+    ("@\"i" "ï" )
+    ("@address@hidden" "ì" )
+    ("@'address@hidden" "í" )
+    ("@address@hidden" "î" )
+    ("@\"o" "ö" )
+    ("@`o" "ò" )
+    ("@'o" "ó" )
+    ("@~o" "õ" )
+    ("@^o" "ô" )
+    ("@\"u" "ü" )
+    ("@`u" "ù" )
+    ("@'u" "ú" )
+    ("@^u" "û" )
+    ("@\"A" "Ä" )
+    ("@`A" "À" )
+    ("@'A" "Á" )
+    ("@~A" "Ã" )
+    ("@^A" "Â" )
+    ("@\"E" "Ë" )
+    ("@`E" "È" )
+    ("@'E" "É" )
+    ("@^E" "Ê" )
+    ("@\"I" "Ï" )
+    ("@`I" "Ì" )
+    ("@'I" "Í" )
+    ("@^I" "Î" )
+    ("@\"O" "Ö" )
+    ("@`O" "Ò" )
+    ("@'O" "Ó" )
+    ("@~O" "Õ" )
+    ("@^O" "Ô" )
+    ("@\"U" "Ü" )
+    ("@`U" "Ù" )
+    ("@'U" "Ú" )
+    ("@^U" "Û" )
+    ("@~n" "ñ" )
+    ("@~N" "Ñ" )
+    ("@,{c}" "ç" )
+    ("@,{C}" "Ç" )
+    ("@ss{}" "ß" )
+    ("@AE{}" "\306" )
+    ("@ae{}" "\346" )
+    ("@AA{}" "\305" )
+    ("@aa{}" "\345" )
+    ("@copyright{}" "\251" )
+    ("@OE{}" "\330")
+    ("@oe{}" "\370")
+;    ("{\\\\pounds}")
+;    ("¶" "{\\\\P}")
+;    ("§" "{\\\\S}")
+    ("@questiondown{}" "¿" )
+    ("@exclamdown{}" "¡" )
+    )
+  "Translation table for translating texinfo sequences to ISO 8859-1 
characters.
+This table is not exhaustive. It only contains commonly used sequences.")
+
+
 (defvar iso-iso2tex-trans-tab
   '(
     ("ä" "{\\\\\"a}")
@@ -196,7 +335,7 @@
 ;;;###autoload
 (defun iso-iso2tex (from to &optional buffer)
  "Translate ISO 8859-1 characters to TeX sequences.
-The region between FROM and TO is translated using the table TRANS-TAB.
+The region between FROM and TO is translated using the table 
`iso-iso2tex-trans-tab'.
 Optional arg BUFFER is ignored (for use in `format-alist')."
  (interactive "*r")
  (iso-translate-conventions from to iso-iso2tex-trans-tab))
@@ -382,7 +521,7 @@
 ;;;###autoload
 (defun iso-tex2iso (from to &optional buffer)
  "Translate TeX sequences to ISO 8859-1 characters.
-The region between FROM and TO is translated using the table TRANS-TAB.
+The region between FROM and TO is translated using the table 
`iso-tex2iso-trans-tab'.
 Optional arg BUFFER is ignored (for use in `format-alist')."
  (interactive "*r")
  (iso-translate-conventions from to iso-tex2iso-trans-tab))
@@ -640,7 +779,7 @@
 ;;;###autoload
 (defun iso-gtex2iso (from to &optional buffer)
  "Translate German TeX sequences to ISO 8859-1 characters.
-The region between FROM and TO is translated using the table TRANS-TAB.
+The region between FROM and TO is translated using the table 
`iso-gtex2iso-trans-tab'.
 Optional arg BUFFER is ignored (for use in `format-alist')."
  (interactive "*r")
  (iso-translate-conventions from to iso-gtex2iso-trans-tab))
@@ -648,7 +787,7 @@
 ;;;###autoload
 (defun iso-iso2gtex (from to &optional buffer)
  "Translate ISO 8859-1 characters to German TeX sequences.
-The region between FROM and TO is translated using the table TRANS-TAB.
+The region between FROM and TO is translated using the table 
`iso-iso2gtex-trans-tab'.
 Optional arg BUFFER is ignored (for use in `format-alist')."
  (interactive "*r")
  (iso-translate-conventions from to iso-iso2gtex-trans-tab))
@@ -665,7 +804,7 @@
 ;;;###autoload
 (defun iso-iso2duden (from to &optional buffer)
  "Translate ISO 8859-1 characters to German TeX sequences.
-The region between FROM and TO is translated using the table TRANS-TAB.
+The region between FROM and TO is translated using the table 
`iso-iso2duden-trans-tab'.
 Optional arg BUFFER is ignored (for use in `format-alist')."
  (interactive "*r")
  (iso-translate-conventions from to iso-iso2duden-trans-tab))






reply via email to

[Prev in Thread] Current Thread [Next in Thread]