# HG changeset patch # User Mark A. Hershberger # Date 1117118147 0 # Node ID d0f8033496b15810238fa5eb98b04236b6973fe7 # Parent 16493952e64841f4b8b3bd62018dc1a8d1d4a607 2005-05-26 Mark A. Hershberger * xml.el (xml-substitute-special): Don't die for undefined xml entities. diff -r 16493952e648 -r d0f8033496b1 lisp/ChangeLog --- a/lisp/ChangeLog Thu May 26 13:41:35 2005 +0000 +++ b/lisp/ChangeLog Thu May 26 14:35:47 2005 +0000 @@ -1,3 +1,8 @@ +2005-05-26 Mark A. Hershberger + + * xml.el (xml-substitute-special): Don't die for undefined xml + entities. + 2005-05-26 Lute Kamstra * arc-mode.el (archive-mode): diff -r 16493952e648 -r d0f8033496b1 lisp/xml.el --- a/lisp/xml.el Thu May 26 13:41:35 2005 +0000 +++ b/lisp/xml.el Thu May 26 14:35:47 2005 +0000 @@ -84,6 +84,9 @@ ;;** ;;******************************************************************* +(defconst xml-undefined-entity "?" + "What to substitute for undefined entities") + (defvar xml-entity-alist '(("lt" . "<") ("gt" . ">") @@ -745,9 +748,10 @@ ((eq (length this-part) 0) (error "XML: (Not Well-Formed) No entity given")) (t - (when xml-validating-parser + (if xml-validating-parser (error "XML: (Validity) Undefined entity `%s'" - this-part)))))) + this-part) + xml-undefined-entity))))) (cond ((null children) ;; FIXME: If we have an entity that expands into XML, this won't work.