]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix documentation of libxml-parse-* functions
authorEli Zaretskii <eliz@gnu.org>
Sat, 29 Apr 2023 06:39:15 +0000 (09:39 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 29 Apr 2023 06:39:15 +0000 (09:39 +0300)
* 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)

doc/lispref/text.texi
src/xml.c

index 4c13185b0ddde2c7b29a3c3d747dcec1c4f6fa3d..f15b3c33e0c0f9c18d4d22ca88b2bb6f6982ecb8 100644 (file)
@@ -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
index b55ac62cdd301cb4cd00728b0f5e43f55327196d..b4c849e6a65c3ee055a9db3e94ba28084a5d960e 100644 (file)
--- 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.  */)