emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108853: * lisp/xml.el (xml-name-rege


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108853: * lisp/xml.el (xml-name-regexp): Remove, redundant. Use xml-name-re.
Date: Tue, 03 Jul 2012 23:31:34 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108853
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2012-07-03 23:31:34 -0400
message:
  * lisp/xml.el (xml-name-regexp): Remove, redundant.  Use xml-name-re.
modified:
  lisp/ChangeLog
  lisp/xml.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-07-03 07:42:31 +0000
+++ b/lisp/ChangeLog    2012-07-04 03:31:34 +0000
@@ -1,3 +1,7 @@
+2012-07-04  Stefan Monnier  <address@hidden>
+
+       * xml.el (xml-name-regexp): Remove, redundant.  Use xml-name-re.
+
 2012-07-03  Michael Albinus  <address@hidden>
 
        * 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.

=== modified file 'lisp/xml.el'
--- a/lisp/xml.el       2012-07-03 05:28:42 +0000
+++ b/lisp/xml.el       2012-07-04 03:31:34 +0000
@@ -294,9 +294,6 @@
   "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 @@
        end-pos name)
     (skip-syntax-forward " ")
     (while (looking-at (eval-when-compile
-                        (concat "\\(" xml-name-regexp "\\)\\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 @@
       (error "XML: (Validity) Invalid DTD (expecting name of the document)"))
 
   ;;  Get the name of the document
-  (looking-at xml-name-regexp)
+  (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]