diff lisp/international/iso-cvt.el @ 8538:94145efe2ad8

(iso-tex2iso-trans-tab): Put the sequences with braces before corresponding ones without. Escape ? in patterns. (iso-translate-conventions): Don't widen. (iso-german-tex-p): Preserve narrowing.
author Richard M. Stallman <rms@gnu.org>
date Sat, 13 Aug 1994 23:58:50 +0000
parents b14b118e6724
children 5e4ef35c904b
line wrap: on
line diff
--- a/lisp/international/iso-cvt.el	Sat Aug 13 23:55:09 1994 +0000
+++ b/lisp/international/iso-cvt.el	Sat Aug 13 23:58:50 1994 +0000
@@ -86,7 +86,6 @@
 (defun iso-translate-conventions (trans-tab)
   "Use the translation table TRANS-TAB to translate the current buffer."
   (save-excursion
-    (widen)
     (goto-char (point-min))
     (let ((work-tab trans-tab)
 	  (buffer-read-only nil)
@@ -377,10 +376,10 @@
     ("\\\\o{a}" "\345")
     ("{\\\\copyright}" "\251")
     ("\\\\copyright{}" "\251")
-    ("?`" "¿")
+    ("{\\?`}" "¿")
+    ("{!`}" "¡")
+    ("\\?`" "¿")
     ("!`" "¡")
-    ("{?`}" "¿")
-    ("{!`}" "¡")
     )
   "Translation table for translating TeX sequences to ISO 8859-1 characters. 
 This table is not exhaustive (and due to TeX's power can never be). It only
@@ -649,9 +648,10 @@
 (defun iso-german-tex-p ()
  "Check if tex buffer is German LaTeX."
  (save-excursion
-   (widen)
-   (goto-char (point-min))
-   (re-search-forward "\\\\documentstyle\\[.*german.*\\]" nil t)))
+   (save-restriction
+     (widen)
+     (goto-char (point-min))
+     (re-search-forward "\\\\documentstyle\\[.*german.*\\]" nil t))))
 
 (defun iso-fix-iso2tex ()
   "Turn ISO 8859-1 (aka. ISO Latin-1) buffer into TeX sequences.
@@ -663,7 +663,7 @@
 	(iso-iso2tex)))
   (if (or (equal major-mode 'tex-mode)
 	  (equal major-mode 'TeX-mode) ; AucTeX wants this
-	  (equal major-mode 'plain-tex-mode)) ; AucTeX wants this
+	  (equal major-mode 'plain-tex-mode))
       (iso-iso2tex)))
 
 (defun iso-fix-tex2iso ()
@@ -676,7 +676,7 @@
 	(iso-tex2iso)))
   (if (or (equal major-mode 'tex-mode)
 	  (equal major-mode 'TeX-mode)  ; AucTeX wants this
-	  (equal major-mode 'plain-tex-mode)) ; AucTeX wants this
+	  (equal major-mode 'plain-tex-mode))
       (iso-tex2iso)))
 
 (defun iso-cvt-ffh ()