]> git.eshelyaron.com Git - emacs.git/commitdiff
(sgml-xml-auto-coding-function): Recognize encoding='FOO'
authorEli Zaretskii <eliz@gnu.org>
Sat, 7 May 2005 15:55:59 +0000 (15:55 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 7 May 2005 15:55:59 +0000 (15:55 +0000)
in single quotes as well as in double quotes.

lisp/ChangeLog
lisp/international/mule.el

index fcf570a341396a347e1a4d0976389db660e14670..23941081c279d06e6202eabb968de6162275e941 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-07  Jirka Kosek  <jirka@kosek.cz>  (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\e,Ae\e(Brd  <bojohan@dd.chalmers.se>
 
        * emacs-lisp/cl-macs.el (cl-transform-lambda): Recognize `declare'
index 2b4117c76056be9c153b4e976250178173735ea2..4b5a56a55b64f0d27c74033dcf7783ccbf657283 100644 (file)
@@ -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)