From: Richard M. Stallman Date: Sat, 13 Aug 1994 23:58:50 +0000 (+0000) Subject: (iso-tex2iso-trans-tab): Put the sequences with braces X-Git-Tag: emacs-19.34~7315 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6674f749e41dadcedc50116fb29b8ed434f23db5;p=emacs.git (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. --- diff --git a/lisp/international/iso-cvt.el b/lisp/international/iso-cvt.el index 375f1d16c1e..b0acadada6c 100644 --- a/lisp/international/iso-cvt.el +++ b/lisp/international/iso-cvt.el @@ -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 @@ little.") ("\\\\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 @@ contains commonly used sequences.") (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 @@ If German TeX is used, German TeX sequences are generated." (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 @@ This function recognices German TeX buffers." (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 ()