changeset 58721:ff6b2a793277

Ensure that validity messages only show when xml-validating-parser is set.
author Mark A. Hershberger <mah@everybody.org>
date Thu, 02 Dec 2004 06:53:43 +0000
parents af6f7a42f2d3
children d6515597c65a
files lisp/xml.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/xml.el	Thu Dec 02 00:39:16 2004 +0000
+++ b/lisp/xml.el	Thu Dec 02 06:53:43 2004 +0000
@@ -653,7 +653,8 @@
 						xml-validating-parser
 						parse-ns))))))))
 	   (t
-	    (error "XML: (Validity) Invalid DTD item")))))
+	    (when xml-validating-parser
+	      (error "XML: (Validity) Invalid DTD item")))))
       (if (looking-at "\\s-*]>")
 	  (goto-char (nth 1 (match-data)))))
     (nreverse dtd)))
@@ -724,9 +725,10 @@
 		    (entity
 		     (cdr entity))
 		    ((eq (length this-part) 0)
-		     (error "XML: (Validity) No entity given"))
+		     (when xml-validating-parser
+		       (error "XML: (Validity) No entity given")))
 		    (t
-		     (if xml-validating-parser
+		     (when xml-validating-parser
 			 (error "XML: (Validity) Undefined entity `%s'"
 				this-part))))))