From: Lars Magne Ingebrigtsen Date: Tue, 14 Sep 2010 18:37:26 +0000 (+0200) Subject: * xml.c (parse_string): Renamed to parse_string(), since that's X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~47^2~119^2~7 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c97c655f5f1e26f3fdde6d5907afcd9ab4cd5bf1;p=emacs.git * xml.c (parse_string): Renamed to parse_string(), since that's what it does. (parse_string): Return nil when the document can't be parsed. --- diff --git a/src/ChangeLog b/src/ChangeLog index 29f410cad86..807b46c1052 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-09-14 Lars Magne Ingebrigtsen + + * xml.c (parse_string): Renamed to parse_string(), since that's + what it does. + (parse_string): Return nil when the document can't be parsed. + 2010-09-14 Jan Djärv * xterm.c (get_current_vm_state): New function. diff --git a/src/xml.c b/src/xml.c index eb844950d05..ddecabb5317 100644 --- a/src/xml.c +++ b/src/xml.c @@ -69,11 +69,11 @@ Lisp_Object make_dom (xmlNode *node) } static Lisp_Object -parse_buffer (Lisp_Object string, Lisp_Object base_url, int htmlp) +parse_string (Lisp_Object string, Lisp_Object base_url, int htmlp) { xmlDoc *doc; xmlNode *node; - Lisp_Object result; + Lisp_Object result = Qnil; int ibeg, iend; char *burl = ""; @@ -114,7 +114,7 @@ If BASE-URL is non-nil, it will be used to expand relative URLs in the HTML document. */) (Lisp_Object string, Lisp_Object base_url) { - return parse_buffer (string, base_url, 1); + return parse_string (string, base_url, 1); } DEFUN ("xml-parse-string", Fxml_parse_string, Sxml_parse_string, @@ -124,7 +124,7 @@ If BASE-URL is non-nil, it will be used to expand relative URLs in the XML document. */) (Lisp_Object string, Lisp_Object base_url) { - return parse_buffer (string, base_url, 0); + return parse_string (string, base_url, 0); }