diff options
| author | Lars Ingebrigtsen | 2018-04-14 17:14:01 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2018-04-14 17:14:01 +0200 |
| commit | e20d7381ee85611f9e1d1e6bef4fe2d7e2ae7780 (patch) | |
| tree | 9eb74901b854761d09426492e47de54f5e8e5ed4 /src/xml.c | |
| parent | db71b3182778b66fad3865825777b06cc20b89a8 (diff) | |
| download | emacs-e20d7381ee85611f9e1d1e6bef4fe2d7e2ae7780.tar.gz emacs-e20d7381ee85611f9e1d1e6bef4fe2d7e2ae7780.zip | |
Make DISCARD-COMMENTS in `libxml-parse-{html,xml}-region' obsolete
* doc/lispref/text.texi (Parsing HTML/XML): Mention that
discard-comments is obsolete.
* lisp/xml.el (xml-remove-comments): New function (bug#27178).
* src/xml.c (Flibxml_parse_html_region): Clarify what
DISCARD-COMMENTS actually does, and say that the parameter is
obsolete.
(Flibxml_parse_xml_region): Ditto.
Diffstat (limited to 'src/xml.c')
| -rw-r--r-- | src/xml.c | 14 |
1 files changed, 12 insertions, 2 deletions
| @@ -271,7 +271,12 @@ DEFUN ("libxml-parse-html-region", Flibxml_parse_html_region, | |||
| 271 | 2, 4, 0, | 271 | 2, 4, 0, |
| 272 | doc: /* Parse the region as an HTML document and return the parse tree. | 272 | doc: /* Parse the region as an HTML document and return the parse tree. |
| 273 | If BASE-URL is non-nil, it is used to expand relative URLs. | 273 | If BASE-URL is non-nil, it is used to expand relative URLs. |
| 274 | If DISCARD-COMMENTS is non-nil, all HTML comments are discarded. */) | 274 | |
| 275 | If DISCARD-COMMENTS is non-nil, the top-level HTML comment is discarded. | ||
| 276 | |||
| 277 | This parameter is obsolete as of 27.1, and you should use the | ||
| 278 | `xml-remove-comments' function to strip comments before calling | ||
| 279 | this function if you don't want comments. */) | ||
| 275 | (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, Lisp_Object discard_comments) | 280 | (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, Lisp_Object discard_comments) |
| 276 | { | 281 | { |
| 277 | if (init_libxml2_functions ()) | 282 | if (init_libxml2_functions ()) |
| @@ -284,7 +289,12 @@ DEFUN ("libxml-parse-xml-region", Flibxml_parse_xml_region, | |||
| 284 | 2, 4, 0, | 289 | 2, 4, 0, |
| 285 | doc: /* Parse the region as an XML document and return the parse tree. | 290 | doc: /* Parse the region as an XML document and return the parse tree. |
| 286 | If BASE-URL is non-nil, it is used to expand relative URLs. | 291 | If BASE-URL is non-nil, it is used to expand relative URLs. |
| 287 | If DISCARD-COMMENTS is non-nil, all HTML comments are discarded. */) | 292 | |
| 293 | If DISCARD-COMMENTS is non-nil, the top-level XML comment is discarded. | ||
| 294 | |||
| 295 | This parameter is obsolete as of 27.1, and you should use the | ||
| 296 | `xml-remove-comments' function to strip comments before calling | ||
| 297 | this function if you don't want comments. */) | ||
| 288 | (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, Lisp_Object discard_comments) | 298 | (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, Lisp_Object discard_comments) |
| 289 | { | 299 | { |
| 290 | if (init_libxml2_functions ()) | 300 | if (init_libxml2_functions ()) |