From: Lars Magne Ingebrigtsen Date: Wed, 20 Jul 2011 20:45:13 +0000 (+0200) Subject: * xml.c (parse_region): Make sure we always return a tree. X-Git-Tag: emacs-pretest-24.0.90~104^2~183 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9abd05321943d7c962c79bfd4ef3354d93ead53e;p=emacs.git * xml.c (parse_region): Make sure we always return a tree. --- diff --git a/src/ChangeLog b/src/ChangeLog index 02819607fd9..1f0ebae2645 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-07-20 Lars Magne Ingebrigtsen + + * xml.c (parse_region): Make sure we always return a tree. + 2011-07-20 HAMANO Kiyoto * xml.c (parse_region): If a document contains only comments, diff --git a/src/xml.c b/src/xml.c index 6d212b44059..a8a4d8122da 100644 --- a/src/xml.c +++ b/src/xml.c @@ -138,7 +138,8 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html if (result == Qnil) result = r; else - result = Fnreverse (Fcons (r, result)); + result = Fcons (intern ("top"), + Fcons (Qnil, Fnreverse (Fcons (r, result)))); xmlFreeDoc (doc); xmlCleanupParser ();