diff options
| author | Paul Eggert | 2019-03-27 10:01:21 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-03-27 10:02:18 -0700 |
| commit | a697d1e638eabdb3eb32337fde6d802ef712eaf8 (patch) | |
| tree | 6b72ddfea5e6cf6bc99e67ecde61537bc8e62a10 | |
| parent | 907d11fc5372e899c89739f79c653eed055450cf (diff) | |
| download | emacs-a697d1e638eabdb3eb32337fde6d802ef712eaf8.tar.gz emacs-a697d1e638eabdb3eb32337fde6d802ef712eaf8.zip | |
Minor xml.el tweaks
* lisp/xml.el (xml-name-start-char-re, xml-name-char-re):
No need to call concat.
(xml-name-char-re): Use \u escapes rather than chars inline,
so that the code matches the comments better and is easier
to audit.
| -rw-r--r-- | lisp/xml.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/xml.el b/lisp/xml.el index 44506b971aa..2337952f064 100644 --- a/lisp/xml.el +++ b/lisp/xml.el | |||
| @@ -176,11 +176,11 @@ See also `xml-get-attribute-or-nil'." | |||
| 176 | 176 | ||
| 177 | ;; [4] NameStartChar | 177 | ;; [4] NameStartChar |
| 178 | ;; See the definition of word syntax in `xml-syntax-table'. | 178 | ;; See the definition of word syntax in `xml-syntax-table'. |
| 179 | (defconst xml-name-start-char-re (concat "[[:word:]:_]")) | 179 | (defconst xml-name-start-char-re "[[:word:]:_]") |
| 180 | 180 | ||
| 181 | ;; [4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | 181 | ;; [4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 |
| 182 | ;; | [#x0300-#x036F] | [#x203F-#x2040] | 182 | ;; | [#x0300-#x036F] | [#x203F-#x2040] |
| 183 | (defconst xml-name-char-re (concat "[-0-9.[:word:]:_·̀-ͯ‿⁀]")) | 183 | (defconst xml-name-char-re "[[:word:]:_.0-9\u00B7\u0300-\u036F\u203F\u2040-]") |
| 184 | 184 | ||
| 185 | ;; [5] Name ::= NameStartChar (NameChar)* | 185 | ;; [5] Name ::= NameStartChar (NameChar)* |
| 186 | (defconst xml-name-re (concat xml-name-start-char-re xml-name-char-re "*")) | 186 | (defconst xml-name-re (concat xml-name-start-char-re xml-name-char-re "*")) |