Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
30eabd7a
Commit
30eabd7a
authored
Jul 03, 2012
by
Stefan Monnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* lisp/xml.el (xml-name-regexp): Remove, redundant. Use xml-name-re.
parent
b3264a61
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
lisp/ChangeLog
lisp/ChangeLog
+8
-4
lisp/xml.el
lisp/xml.el
+2
-5
No files found.
lisp/ChangeLog
View file @
30eabd7a
2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
* xml.el (xml-name-regexp): Remove, redundant. Use xml-name-re.
2012-07-03 Michael Albinus <michael.albinus@gmx.de>
* vc/ediff-diff.el (ediff-same-file-contents): Fix it for remote
...
...
@@ -26,10 +30,10 @@
them to expand into markup as per XML spec.
(xml-default-ns): New variable.
(xml-entity-alist): Use XML spec definitions for lt and amp.
(xml-parse-region): Make first two arguments optional.
Discard
text properties.
(xml-parse-tag-1): New function, spun off from xml-parse-tag.
All
callers changed.
(xml-parse-region): Make first two arguments optional.
Discard
text properties.
(xml-parse-tag-1): New function, spun off from xml-parse-tag.
All
callers changed.
(xml-parse-tag): Call xml-parse-tag-1. For backward
compatibility, this function should not modify buffer contents.
(xml-parse-tag-1): Fix opening-tag regexp.
...
...
lisp/xml.el
View file @
30eabd7a
...
...
@@ -294,9 +294,6 @@ If PARSE-NS is non-nil, then QNAMES are expanded."
"Syntax table used by `xml-parse-region'."
)
;; XML [5]
;; Note that [:alpha:] matches all multibyte chars with word syntax.
(
eval-and-compile
(
defconst
xml-name-regexp
"[[:alpha:]_:][[:alnum:]._:-]*"
))
;; Fixme: This needs re-writing to deal with the XML grammar properly, i.e.
;; document ::= prolog element Misc*
...
...
@@ -588,7 +585,7 @@ Leave point at the first non-blank character after the tag."
end-pos name)
(skip-syntax-forward "
")
(while (looking-at (eval-when-compile
(concat "
\\
(
" xml-name-re
gexp
"
\\
)
\\s-*=\\s-*
")))
(concat "
\\
(
" xml-name-re "
\\
)
\\s-*=\\s-*
")))
(setq end-pos (match-end 0))
(setq name (xml-maybe-do-ns (match-string-no-properties 1) nil xml-ns))
(goto-char end-pos)
...
...
@@ -643,7 +640,7 @@ This follows the rule [28] in the XML specifications."
(error "
XML:
(
Validity
)
Invalid
DTD
(
expecting
name
of
the
document
)
"))
;; Get the name of the document
(looking-at xml-name-re
gexp
)
(looking-at xml-name-re)
(let ((dtd (list (match-string-no-properties 0) 'dtd))
(xml-parameter-entity-alist xml-parameter-entity-alist)
(parameter-entity-re (eval-when-compile
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment