Clean up syntax-table usage in xml.el
commit566df3fcac8010303c1d8b8558cb07f3a057b346
authorChong Yidong <cyd@gnu.org>
Wed, 4 Jul 2012 16:14:05 +0000 (5 00:14 +0800)
committerChong Yidong <cyd@gnu.org>
Wed, 4 Jul 2012 16:14:05 +0000 (5 00:14 +0800)
treec03584ee0936855ce95cb9e84c241cc016c095f5
parent0781098af7c8da77b1d044dce151e6a130eb1e77
Clean up syntax-table usage in xml.el

* xml.el (xml--parse-buffer): Use xml-syntax-table.
(xml-parse-tag): Likewise, and avoid changing entity tables.
(xml-syntax-table): Define from scratch, making sure not to give
x2000 and other Unicode spaces whitespace syntax, since those are
not spaces in XML.
(xml-parse-fragment): Delete unused function.
(xml-name-start-char-re, xml-name-char-re, xml-name-re)
(xml-names-re, xml-nmtoken-re, xml-nmtokens-re, xml-char-ref-re)
(xml-entity-ref, xml-pe-reference-re)
(xml-reference-re,xml-att-value-re, xml-tokenized-type-re)
(xml-notation-type-re, xml-enumeration-re, xml-enumerated-type-re)
(xml-att-type-re, xml-default-decl-re, xml-att-def-re)
(xml-entity-value-re): Use syntax references in regexps where
possible; no need to define inside a let-binding.
(xml-parse-dtd): Use xml-pe-reference-re.
(xml-entity-or-char-ref-re): New defconst.
(xml-parse-string, xml-substitute-special): Use it.
lisp/ChangeLog
lisp/xml.el
test/automated/xml-parse-tests.el