From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63291: libxml-parse-{html, xml}-region help page incorrect argument lower bound Date: Fri, 05 May 2023 10:13:51 +0300 Message-ID: <83y1m3i72o.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22564"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63291-done@debbugs.gnu.org To: Ruijie Yu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 05 09:14:14 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pupdu-0005fi-EW for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 May 2023 09:14:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pupdm-0001Fe-1E; Fri, 05 May 2023 03:14:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pupdj-0001Ef-6W for bug-gnu-emacs@gnu.org; Fri, 05 May 2023 03:14:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pupdi-0001kh-TS for bug-gnu-emacs@gnu.org; Fri, 05 May 2023 03:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pupdi-00014O-CT for bug-gnu-emacs@gnu.org; Fri, 05 May 2023 03:14:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 May 2023 07:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 63291 X-GNU-PR-Package: emacs Mail-Followup-To: 63291@debbugs.gnu.org, eliz@gnu.org, ruijie@netyu.xyz Original-Received: via spool by 63291-done@debbugs.gnu.org id=D63291.16832707954031 (code D ref 63291); Fri, 05 May 2023 07:14:02 +0000 Original-Received: (at 63291-done) by debbugs.gnu.org; 5 May 2023 07:13:15 +0000 Original-Received: from localhost ([127.0.0.1]:53071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pupcu-00012u-1W for submit@debbugs.gnu.org; Fri, 05 May 2023 03:13:15 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pupco-00012D-Fk for 63291-done@debbugs.gnu.org; Fri, 05 May 2023 03:13:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pupch-0001Vx-0y; Fri, 05 May 2023 03:13:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=PKNBuzUrQuDieSfe90My3ydzhCvsnsOWqgHldsnyHjo=; b=gu4eXl8IYj/5lSjNBIwP 1hUtGP9yJNi/e+m2Ge1Z67Gg5KS/LuUskA2cVg0oKvDBTR46A2YO2ekNHRZP9GpNawW7JLUd2Ee82 +ZhwF+o8k10Up8uh/flWgkGcOVBi8BskslFNDUI1UN5bnLYlDItlwxdCNi0L/vnm7Ho+HhCxOBgOf VvVwJ3rkOF3ZisKJpaHTfxV8DHfiKMfY1mswV2aiZO0/ZeuHVgC/RRkptQLAyjUnL/PEDSPsP9Ho8 OlBCaEtiYYAfZNZjtzdnhC1bixIFcuqbbK1BleiCqDjAqDWas+X25Vaj+BE7S/gaHemRabVLIP51a VwZ/a0SI8ICecA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pupcg-0007RZ-GD; Fri, 05 May 2023 03:12:58 -0400 In-Reply-To: (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261074 Archived-At: > 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" > > 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.