diff options
| author | Stefan Monnier | 2012-07-03 23:31:34 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-07-03 23:31:34 -0400 |
| commit | 30eabd7ad8328c1b6dfb6514685044e246bf0f04 (patch) | |
| tree | d28957b0f1b54297339fc82335b00d948705282d | |
| parent | b3264a61ffdef42ae9c26c707f8671f53970d851 (diff) | |
| download | emacs-30eabd7ad8328c1b6dfb6514685044e246bf0f04.tar.gz emacs-30eabd7ad8328c1b6dfb6514685044e246bf0f04.zip | |
* lisp/xml.el (xml-name-regexp): Remove, redundant. Use xml-name-re.
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/xml.el | 7 |
2 files changed, 10 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ff526afcee1..250aaa3bde4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * xml.el (xml-name-regexp): Remove, redundant. Use xml-name-re. | ||
| 4 | |||
| 1 | 2012-07-03 Michael Albinus <michael.albinus@gmx.de> | 5 | 2012-07-03 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 6 | ||
| 3 | * vc/ediff-diff.el (ediff-same-file-contents): Fix it for remote | 7 | * vc/ediff-diff.el (ediff-same-file-contents): Fix it for remote |
| @@ -26,10 +30,10 @@ | |||
| 26 | them to expand into markup as per XML spec. | 30 | them to expand into markup as per XML spec. |
| 27 | (xml-default-ns): New variable. | 31 | (xml-default-ns): New variable. |
| 28 | (xml-entity-alist): Use XML spec definitions for lt and amp. | 32 | (xml-entity-alist): Use XML spec definitions for lt and amp. |
| 29 | (xml-parse-region): Make first two arguments optional. Discard | 33 | (xml-parse-region): Make first two arguments optional. |
| 30 | text properties. | 34 | Discard text properties. |
| 31 | (xml-parse-tag-1): New function, spun off from xml-parse-tag. All | 35 | (xml-parse-tag-1): New function, spun off from xml-parse-tag. |
| 32 | callers changed. | 36 | All callers changed. |
| 33 | (xml-parse-tag): Call xml-parse-tag-1. For backward | 37 | (xml-parse-tag): Call xml-parse-tag-1. For backward |
| 34 | compatibility, this function should not modify buffer contents. | 38 | compatibility, this function should not modify buffer contents. |
| 35 | (xml-parse-tag-1): Fix opening-tag regexp. | 39 | (xml-parse-tag-1): Fix opening-tag regexp. |
diff --git a/lisp/xml.el b/lisp/xml.el index 2595fd572f4..f2c1a703f88 100644 --- a/lisp/xml.el +++ b/lisp/xml.el | |||
| @@ -294,9 +294,6 @@ If PARSE-NS is non-nil, then QNAMES are expanded." | |||
| 294 | "Syntax table used by `xml-parse-region'.") | 294 | "Syntax table used by `xml-parse-region'.") |
| 295 | 295 | ||
| 296 | ;; XML [5] | 296 | ;; XML [5] |
| 297 | ;; Note that [:alpha:] matches all multibyte chars with word syntax. | ||
| 298 | (eval-and-compile | ||
| 299 | (defconst xml-name-regexp "[[:alpha:]_:][[:alnum:]._:-]*")) | ||
| 300 | 297 | ||
| 301 | ;; Fixme: This needs re-writing to deal with the XML grammar properly, i.e. | 298 | ;; Fixme: This needs re-writing to deal with the XML grammar properly, i.e. |
| 302 | ;; document ::= prolog element Misc* | 299 | ;; document ::= prolog element Misc* |
| @@ -588,7 +585,7 @@ Leave point at the first non-blank character after the tag." | |||
| 588 | end-pos name) | 585 | end-pos name) |
| 589 | (skip-syntax-forward " ") | 586 | (skip-syntax-forward " ") |
| 590 | (while (looking-at (eval-when-compile | 587 | (while (looking-at (eval-when-compile |
| 591 | (concat "\\(" xml-name-regexp "\\)\\s-*=\\s-*"))) | 588 | (concat "\\(" xml-name-re "\\)\\s-*=\\s-*"))) |
| 592 | (setq end-pos (match-end 0)) | 589 | (setq end-pos (match-end 0)) |
| 593 | (setq name (xml-maybe-do-ns (match-string-no-properties 1) nil xml-ns)) | 590 | (setq name (xml-maybe-do-ns (match-string-no-properties 1) nil xml-ns)) |
| 594 | (goto-char end-pos) | 591 | (goto-char end-pos) |
| @@ -643,7 +640,7 @@ This follows the rule [28] in the XML specifications." | |||
| 643 | (error "XML: (Validity) Invalid DTD (expecting name of the document)")) | 640 | (error "XML: (Validity) Invalid DTD (expecting name of the document)")) |
| 644 | 641 | ||
| 645 | ;; Get the name of the document | 642 | ;; Get the name of the document |
| 646 | (looking-at xml-name-regexp) | 643 | (looking-at xml-name-re) |
| 647 | (let ((dtd (list (match-string-no-properties 0) 'dtd)) | 644 | (let ((dtd (list (match-string-no-properties 0) 'dtd)) |
| 648 | (xml-parameter-entity-alist xml-parameter-entity-alist) | 645 | (xml-parameter-entity-alist xml-parameter-entity-alist) |
| 649 | (parameter-entity-re (eval-when-compile | 646 | (parameter-entity-re (eval-when-compile |