unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ruijie Yu <ruijie@netyu.xyz>
Cc: 63291-done@debbugs.gnu.org
Subject: bug#63291: libxml-parse-{html, xml}-region help page incorrect argument lower bound
Date: Fri, 05 May 2023 10:13:51 +0300	[thread overview]
Message-ID: <83y1m3i72o.fsf@gnu.org> (raw)
In-Reply-To: <sdvfs8bff47.fsf@netyu.xyz> (bug-gnu-emacs@gnu.org)

> Date: Fri, 05 May 2023 14:38:02 +0800
> From:  Ruijie Yu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> I'm reading the help page of `libxml-parse-xml-region' and noticed this:
> 
> --8<---------------cut here---------------start------------->8---
> libxml-parse-xml-region is a built-in function in ‘src/xml.c’.
> 
> (libxml-parse-xml-region START END &optional BASE-URL)
> 
> Parse the region as an XML document and return the parse tree.
> If START is nil, it defaults to ‘point-min’.  If END is nil, it
> defaults to ‘point-max’.
> 
> ...
> --8<---------------cut here---------------end--------------->8---
> 
> Notice the function signature: it implies that the first two arguments
> are mandatory, even though the docstring proceeds to talk about what
> happens when these two arguments are nil.  Similarly for
> `libxml-parse-html-region'.
> 
> However, both the C source code and experiments show that these two
> functions do accept 0 arguments.

This is because a recent change made the first 2 arguments optional,
but advertised-calling-convention of these functions in subr.el was
not adjusted to that change, and was overriding the effect of the
DEFUN macros, which say the truth: up to 4 arguments, with zero
mandatory ones.

Fixed on the emacs-29 branch.





      reply	other threads:[~2023-05-05  7:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05  6:38 bug#63291: libxml-parse-{html, xml}-region help page incorrect argument lower bound Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-05  7:13 ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83y1m3i72o.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=63291-done@debbugs.gnu.org \
    --cc=ruijie@netyu.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).