From b7f29772f5818da4d7d69ae5e85e48052f390038 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Sun, 1 May 2005 11:05:08 +0000 Subject: [PATCH] (latexenc-find-file-coding-system): Fix regular expressions. Suggested by David Kastrup and Stefan Monnier . --- lisp/ChangeLog | 6 ++++++ lisp/international/latexenc.el | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8c6d7a14df8..45c616e87c5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-05-01 Lute Kamstra + + * international/latexenc.el (latexenc-find-file-coding-system): + Fix regular expressions. Suggested by David Kastrup + and Stefan Monnier . + 2005-05-01 Nick Roberts * subr.el (string-to-int): Make obsolete. diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el index efd29177b42..1fd04b55919 100644 --- a/lisp/international/latexenc.el +++ b/lisp/international/latexenc.el @@ -121,8 +121,8 @@ coding system names is determined from `latex-inputenc-coding-alist'." ;; try to find the coding system in this file (goto-char (point-min)) (if (or - (re-search-forward "^[^%$]*\\inputencoding{\\(.*\\)}" nil t) - (re-search-forward "^[^%$]*\\usepackage\\[\\(.*\\)\\]{inputenc}" nil t)) + (re-search-forward "^[^%\n]*\\\\inputencoding{\\(.*\\)}" nil t) + (re-search-forward "^[^%\n]*\\\\usepackage\\[\\(.*\\)\\]{inputenc}" nil t)) (let* ((match (match-string 1)) (sym (intern match))) (when (latexenc-inputenc-to-coding-system match) -- 2.39.2