From c2c51a11cdfb8a6e8e3a916e27b38d846c76dbdc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 7 May 2005 15:55:59 +0000 Subject: [PATCH] (sgml-xml-auto-coding-function): Recognize encoding='FOO' in single quotes as well as in double quotes. --- lisp/ChangeLog | 5 +++++ lisp/international/mule.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fcf570a3413..23941081c27 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-05-07 Jirka Kosek (tiny change) + + * international/mule.el (sgml-xml-auto-coding-function): Recognize + encoding='FOO' in single quotes as well as in double quotes. + 2005-05-07 Johan Bockg,Ae(Brd * emacs-lisp/cl-macs.el (cl-transform-lambda): Recognize `declare' diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 2b4117c7605..4b5a56a55b6 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -2180,9 +2180,9 @@ This function is intended to be added to `auto-coding-functions'." (when (re-search-forward "\\`[[:space:]\n]*<\\?xml" size t) (let ((end (save-excursion ;; This is a hack. - (re-search-forward "\"\\s-*\\?>" size t)))) + (re-search-forward "[\"']\\s-*\\?>" size t)))) (when end - (if (re-search-forward "encoding=\"\\(.+?\\)\"" end t) + (if (re-search-forward "encoding=[\"']\\(.+?\\)[\"']" end t) (let* ((match (match-string 1)) (sym (intern (downcase match)))) (if (coding-system-p sym) -- 2.39.2