]> code.delx.au - gnu-emacs/blobdiff - lisp/xml.el
There's no reason not to compile version.el
[gnu-emacs] / lisp / xml.el
index 68aa5f4db6f59b872cee055b4826c94ac583014f..cb56f023af060a3c43856e4ad35bbd1efca88ad1 100644 (file)
@@ -1,6 +1,6 @@
 ;;; xml.el --- XML parser
 
-;; Copyright (C) 2000-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2012 Free Software Foundation, Inc.
 
 ;; Author: Emmanuel Briot  <briot@gnat.com>
 ;; Maintainer: Mark A. Hershberger <mah@everybody.org>
@@ -323,7 +323,8 @@ If PARSE-NS is non-nil, then QNAMES are expanded."
                  (cond
                   ((null result)
                    ;; Not looking at an xml start tag.
-                   (forward-char 1))
+                   (unless (eobp)
+                     (forward-char 1)))
                   ((and xml (not xml-sub-parser))
                    ;; Translation of rule [1] of XML specifications
                    (error "XML: (Not Well-Formed) Only one root tag allowed"))
@@ -421,7 +422,9 @@ Returns one of:
      ;;  skip comments
      ((looking-at "<!--")
       (search-forward "-->")
-      nil)
+      (skip-syntax-forward " ")
+      (unless (eobp)
+       (xml-parse-tag parse-dtd xml-ns)))
      ;;  end tag
      ((looking-at "</")
       '())
@@ -756,7 +759,7 @@ This follows the rule [28] in the XML specifications."
 ;;*******************************************************************
 
 (defun xml-substitute-special (string)
-  "Return STRING, after subsituting entity references."
+  "Return STRING, after substituting entity references."
   ;; This originally made repeated passes through the string from the
   ;; beginning, which isn't correct, since then either "&amp;amp;" or
   ;; "&#38;amp;" won't DTRT.