Commit c2c51a11 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(sgml-xml-auto-coding-function): Recognize encoding='FOO'

in single quotes as well as in double quotes.
parent a5ad278d
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,Ae(Brd <bojohan@dd.chalmers.se>
 
* emacs-lisp/cl-macs.el (cl-transform-lambda): Recognize `declare'
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment