From: Eli Zaretskii Date: Sat, 29 Apr 2023 06:39:15 +0000 (+0300) Subject: Fix documentation of libxml-parse-* functions X-Git-Tag: emacs-29.0.91~76 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b4f2f499783386ed1290393790065b96273ae884;p=emacs.git Fix documentation of libxml-parse-* functions * doc/lispref/text.texi (Parsing HTML/XML): * src/xml.c (Flibxml_parse_html_region, Flibxml_parse_xml_region): Update the documentation regarding the use of BASE-URL argument. (Bug#63125) --- diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 4c13185b0dd..f15b3c33e0c 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -5510,7 +5510,7 @@ contents of an SQLite database. @section Parsing HTML and XML @cindex parsing html - Emacs can be compiled with built-in libxml2 support. + Emacs can be compiled with built-in @file{libxml2} support. @defun libxml-available-p This function returns non-@code{nil} if built-in libxml2 support is @@ -5529,8 +5529,10 @@ mistakes. If @var{start} or @var{end} are @code{nil}, they default to the values from @code{point-min} and @code{point-max}, respectively. -The optional argument @var{base-url}, if non-@code{nil}, should be a -string specifying the base URL for relative URLs occurring in links. +The optional argument @var{base-url}, if non-@code{nil}, should be +used for warnings and errors reported by the @file{libxml2} library, +but Emacs currently calls the library with errors and warnings +disabled, so this argument is not used. If the optional argument @var{discard-comments} is non-@code{nil}, any top-level comment is discarded. (This argument is obsolete and diff --git a/src/xml.c b/src/xml.c index b55ac62cdd3..b4c849e6a65 100644 --- a/src/xml.c +++ b/src/xml.c @@ -280,7 +280,10 @@ DEFUN ("libxml-parse-html-region", Flibxml_parse_html_region, If START is nil, it defaults to `point-min'. If END is nil, it defaults to `point-max'. -If BASE-URL is non-nil, it is used to expand relative URLs. +If BASE-URL is non-nil, it is used if and when reporting errors and +warnings from the underlying libxml2 library. Currently, errors and +warnings from the library are suppressed, so this argument is largely +ignored. If you want comments to be stripped, use the `xml-remove-comments' function to strip comments before calling this function. */) @@ -298,7 +301,10 @@ DEFUN ("libxml-parse-xml-region", Flibxml_parse_xml_region, If START is nil, it defaults to `point-min'. If END is nil, it defaults to `point-max'. -If BASE-URL is non-nil, it is used to expand relative URLs. +If BASE-URL is non-nil, it is used if and when reporting errors and +warnings from the underlying libxml2 library. Currently, errors and +warnings from the library are suppressed, so this argument is largely +ignored. If you want comments to be stripped, use the `xml-remove-comments' function to strip comments before calling this function. */)