User: youngs
Date: 05/10/01 00:48:49
Modified: packages/xemacs-packages/net-utils ChangeLog xml.el
Log:
2005-10-01 Steve Youngs <steve(a)sxemacs.org>
* xml.el (xml-parse-region):
* xml.el (xml-parse-tag):
Fix bug where an empty element written as <foo/> incorrectly has a
list of children.
From: David Aspinall <David.Aspinall(a)ed.ac.uk>
Revision Changes Path
1.73 +8 -0 XEmacs/packages/xemacs-packages/net-utils/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/net-utils/ChangeLog,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -p -r1.72 -r1.73
--- ChangeLog 2005/05/01 13:08:28 1.72
+++ ChangeLog 2005/09/30 22:48:48 1.73
@@ -1,3 +1,11 @@
+2005-10-01 Steve Youngs <steve(a)sxemacs.org>
+
+ * xml.el (xml-parse-region):
+ * xml.el (xml-parse-tag):
+ Fix bug where an empty element written as <foo/> incorrectly has a
+ list of children.
+ From: David Aspinall <David.Aspinall(a)ed.ac.uk>
+
2005-05-01 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.46 released.
1.3 +6 -3 XEmacs/packages/xemacs-packages/net-utils/xml.el
Index: xml.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/net-utils/xml.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- xml.el 2003/12/03 01:35:17 1.2
+++ xml.el 2005/09/30 22:48:49 1.3
@@ -1,5 +1,8 @@
;;; xml.el --- XML parser
+;;; !!! This version has been modified from the version distributed with
+;;; XEmacs to fix a bug parsing empty elements, for Proof General. !!!
+
;; Copyright (C) 2000, 2001 Free Software Foundation, Inc.
;; Author: Emmanuel Briot <briot(a)gnat.com>
@@ -169,8 +172,8 @@ and returned as the first element of the
(error "XML files can have only one toplevel tag")))
(goto-char end)))
(if parse-dtd
- (cons dtd (reverse xml))
- (reverse xml)))))
+ (cons dtd (nreverse xml))
+ (nreverse xml)))))
(defun xml-parse-tag (end &optional parse-dtd)
@@ -225,7 +228,7 @@ Returns one of:
(if (looking-at "/>")
(progn
(forward-char 2)
- (nreverse (cons '("") children)))
+ (nreverse children))
;; is this a valid start tag ?
(if (eq (char-after) ?>)