GNU bug report logs - #73881
31.0.50; Unexpected warnings about recursive occurrences of obsolete functions

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Eshel Yaron <me@HIDDEN>; dated Sat, 19 Oct 2024 13:25:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 30 Oct 2024 07:18:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 30 03:18:14 2024
Received: from localhost ([127.0.0.1]:33615 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t62y6-0005yb-36
	for submit <at> debbugs.gnu.org; Wed, 30 Oct 2024 03:18:14 -0400
Received: from lists.gnu.org ([209.51.188.17]:55796)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1t62y4-0005yT-0W
 for submit <at> debbugs.gnu.org; Wed, 30 Oct 2024 03:18:12 -0400
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 <me@HIDDEN>) id 1t62xq-0006Ui-Bu
 for bug-gnu-emacs@HIDDEN; Wed, 30 Oct 2024 03:18:01 -0400
Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <me@HIDDEN>)
 id 1t62xo-0001DI-8i; Wed, 30 Oct 2024 03:17:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1730272674;
 bh=ZS7KgXWVfeQlP7gm1v7LLqjLw6msPuFZ0SI7ZjOp5x0=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=QKXFG+r2D2Ocx5a9aobTc4jU5PSDUUnxVX0RPYXAUwxJXB8AswAUt7TEtyZZaELa3
 9IUoOma57B+g5BosXqgOBLTXn72bjFslnZY6yjB4qI9T/6Uker0SZ9B7ZMDdN85s1T
 8U0GLMVLiPJTrty2ZjupsI/3aYQryquniyMEMHehvOiPKDGlGgR6lZgusdAtGXV6sc
 v+XWbOO3hrpFiDqCVV/r4h6rCbAsGt53ihIWoOaGcg9ZKvmHwkKXrUbpDOKQ0QLD+e
 UWlEo7K0gg00lif0m0HdzUEII/War0dAWR5fjc3s++fF7mNqsICHTmGkIy6aXu08tU
 GDziC1+gZ3Lvg==
From: Eshel Yaron <me@HIDDEN>
To: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#73881: 31.0.50; Unexpected warnings about recursive
 occurrences of obsolete functions
In-Reply-To: <jwvzfmmib48.fsf-monnier+emacs@HIDDEN> (Stefan Monnier via's
 message of "Tue, 29 Oct 2024 22:24:05 -0400")
References: <m1y12kdy99.fsf@HIDDEN> <86wmi4jh54.fsf@HIDDEN>
 <m134ksdkub.fsf@HIDDEN> <86jze4j6wh.fsf@HIDDEN>
 <jwva5ez8qrx.fsf-monnier+emacs@HIDDEN>
 <CADwFkmkxuKpZDKm28yZeredjoUBYTjSimTHGajjH1wZsf9x2Ag@HIDDEN>
 <jwv7c9tnz4t.fsf-monnier+emacs@HIDDEN>
 <CADwFkm=XyGwV05LT9Y_TAAZXYWS+K24mK5GQk1UPh7SAvn0mLA@HIDDEN>
 <m1wmhrml2b.fsf@HIDDEN>
 <jwvzfmmib48.fsf-monnier+emacs@HIDDEN>
Date: Wed, 30 Oct 2024 08:17:51 +0100
Message-ID: <m1bjz2awkg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@HIDDEN;
 helo=eshelyaron.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
Cc: Eli Zaretskii <eliz@HIDDEN>, Andrea Corallo <acorallo@HIDDEN>,
 73881 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>,
 Stefan Kangas <stefankangas@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

Hi,

Stefan Monnier writes:

>> To me as well.  Would there any harm in emitting the make-obsolete form
>> above the defalias form to cover also the warnings for recursive calls?
>
> I can come up with scenarios where it would, of course, but they're
> probably not too important.
>
> OTOH these entries are generated by a generic piece of code which
> handles all the `declare` thingies and puts them all after the function
> definition, and moving them *all* would seem a lot more risky.

Right, it's slightly complicated...  So how about using my one-line
patch from upthread, which takes care of recursive calls specifically,
along with your patch?


Eshel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73881; Package emacs. Full text available.

Message received at 73881 <at> debbugs.gnu.org:


Received: (at 73881) by debbugs.gnu.org; 30 Oct 2024 07:17:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 30 03:17:58 2024
Received: from localhost ([127.0.0.1]:33610 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t62xp-0005xv-OF
	for submit <at> debbugs.gnu.org; Wed, 30 Oct 2024 03:17:57 -0400
Received: from mail.eshelyaron.com ([107.175.124.16]:60862 helo=eshelyaron.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1t62xn-0005xp-6p
 for 73881 <at> debbugs.gnu.org; Wed, 30 Oct 2024 03:17:56 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1730272674;
 bh=ZS7KgXWVfeQlP7gm1v7LLqjLw6msPuFZ0SI7ZjOp5x0=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=QKXFG+r2D2Ocx5a9aobTc4jU5PSDUUnxVX0RPYXAUwxJXB8AswAUt7TEtyZZaELa3
 9IUoOma57B+g5BosXqgOBLTXn72bjFslnZY6yjB4qI9T/6Uker0SZ9B7ZMDdN85s1T
 8U0GLMVLiPJTrty2ZjupsI/3aYQryquniyMEMHehvOiPKDGlGgR6lZgusdAtGXV6sc
 v+XWbOO3hrpFiDqCVV/r4h6rCbAsGt53ihIWoOaGcg9ZKvmHwkKXrUbpDOKQ0QLD+e
 UWlEo7K0gg00lif0m0HdzUEII/War0dAWR5fjc3s++fF7mNqsICHTmGkIy6aXu08tU
 GDziC1+gZ3Lvg==
From: Eshel Yaron <me@HIDDEN>
To: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#73881: 31.0.50; Unexpected warnings about recursive
 occurrences of obsolete functions
In-Reply-To: <jwvzfmmib48.fsf-monnier+emacs@HIDDEN> (Stefan Monnier via's
 message of "Tue, 29 Oct 2024 22:24:05 -0400")
References: <m1y12kdy99.fsf@HIDDEN> <86wmi4jh54.fsf@HIDDEN>
 <m134ksdkub.fsf@HIDDEN> <86jze4j6wh.fsf@HIDDEN>
 <jwva5ez8qrx.fsf-monnier+emacs@HIDDEN>
 <CADwFkmkxuKpZDKm28yZeredjoUBYTjSimTHGajjH1wZsf9x2Ag@HIDDEN>
 <jwv7c9tnz4t.fsf-monnier+emacs@HIDDEN>
 <CADwFkm=XyGwV05LT9Y_TAAZXYWS+K24mK5GQk1UPh7SAvn0mLA@HIDDEN>
 <m1wmhrml2b.fsf@HIDDEN>
 <jwvzfmmib48.fsf-monnier+emacs@HIDDEN>
Date: Wed, 30 Oct 2024 08:17:51 +0100
Message-ID: <m1bjz2awkg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73881
Cc: Eli Zaretskii <eliz@HIDDEN>, Andrea Corallo <acorallo@HIDDEN>,
 73881 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>,
 Stefan Kangas <stefankangas@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

Stefan Monnier writes:

>> To me as well.  Would there any harm in emitting the make-obsolete form
>> above the defalias form to cover also the warnings for recursive calls?
>
> I can come up with scenarios where it would, of course, but they're
> probably not too important.
>
> OTOH these entries are generated by a generic piece of code which
> handles all the `declare` thingies and puts them all after the function
> definition, and moving them *all* would seem a lot more risky.

Right, it's slightly complicated...  So how about using my one-line
patch from upthread, which takes care of recursive calls specifically,
along with your patch?


Eshel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73881; Package emacs. Full text available.

Message received at 73881 <at> debbugs.gnu.org:


Received: (at 73881) by debbugs.gnu.org; 30 Oct 2024 02:24:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 29 22:24:24 2024
Received: from localhost ([127.0.0.1]:60409 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t5yNk-0004kF-J2
	for submit <at> debbugs.gnu.org; Tue, 29 Oct 2024 22:24:24 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32378)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1t5yNh-0004k4-1n
 for 73881 <at> debbugs.gnu.org; Tue, 29 Oct 2024 22:24:22 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1C5C9444437;
 Tue, 29 Oct 2024 22:24:14 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1730255053;
 bh=UE+rKcKnuCOibUlSSFNAVk17ql6PZi5GZMwajeGdwpA=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=IF7/ri66aR9gksa/VYr3KoHn7NrwUrOcrwctqAaEsoITl5F3EnjiF+fHAj74m222r
 I9Tc7N+4CZ27RjGlqCLfOYfzlVtldDKrWIO80iPklD6SYyGQuAO0kDFag6eNsT/G32
 0B1Q/zaS3zVzU1PutQ0kRkjeosCDPS2F1J9nw6Fs9vTR7Z02K2A5Op7jR8ydyr/OwQ
 wnQpBf9XzCPBkW0nU81GFMWt4NwTEhD0Z1pgqmY/TFHQJL0jQSrXXMWoY4NPSMtr81
 8lWjFrFLi56y0C8Jnyz+aRm0qUKlN9qGQZD3Wt6marm+K3krJLj9L1p5PTqmQO1wOs
 yKLy2O1uu3A/g==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 09F3D444428;
 Tue, 29 Oct 2024 22:24:13 -0400 (EDT)
Received: from pastel (69-196-161-60.dsl.teksavvy.com [69.196.161.60])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C06DD12041C;
 Tue, 29 Oct 2024 22:24:12 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
Subject: Re: bug#73881: 31.0.50; Unexpected warnings about recursive
 occurrences of obsolete functions
In-Reply-To: <m1wmhrml2b.fsf@HIDDEN> (Eshel Yaron's message of "Tue, 
 29 Oct 2024 08:21:00 +0100")
Message-ID: <jwvzfmmib48.fsf-monnier+emacs@HIDDEN>
References: <m1y12kdy99.fsf@HIDDEN> <86wmi4jh54.fsf@HIDDEN>
 <m134ksdkub.fsf@HIDDEN> <86jze4j6wh.fsf@HIDDEN>
 <jwva5ez8qrx.fsf-monnier+emacs@HIDDEN>
 <CADwFkmkxuKpZDKm28yZeredjoUBYTjSimTHGajjH1wZsf9x2Ag@HIDDEN>
 <jwv7c9tnz4t.fsf-monnier+emacs@HIDDEN>
 <CADwFkm=XyGwV05LT9Y_TAAZXYWS+K24mK5GQk1UPh7SAvn0mLA@HIDDEN>
 <m1wmhrml2b.fsf@HIDDEN>
Date: Tue, 29 Oct 2024 22:24:05 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.131 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 73881
Cc: Eli Zaretskii <eliz@HIDDEN>, Andrea Corallo <acorallo@HIDDEN>,
 73881 <at> debbugs.gnu.org, Stefan Kangas <stefankangas@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> To me as well.  Would there any harm in emitting the make-obsolete form
> above the defalias form to cover also the warnings for recursive calls?

I can come up with scenarios where it would, of course, but they're
probably not too important.

OTOH these entries are generated by a generic piece of code which
handles all the `declare` thingies and puts them all after the function
definition, and moving them *all* would seem a lot more risky.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73881; Package emacs. Full text available.

Message received at 73881 <at> debbugs.gnu.org:


Received: (at 73881) by debbugs.gnu.org; 29 Oct 2024 07:21:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 29 03:21:06 2024
Received: from localhost ([127.0.0.1]:55737 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t5gXK-0007q6-7f
	for submit <at> debbugs.gnu.org; Tue, 29 Oct 2024 03:21:06 -0400
Received: from mail.eshelyaron.com ([107.175.124.16]:52792 helo=eshelyaron.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1t5gXH-0007pr-Kw
 for 73881 <at> debbugs.gnu.org; Tue, 29 Oct 2024 03:21:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1730186463;
 bh=wptJ4G+3y8TUa63OAweWUaUaU/pRxHIINhD/g6oK6KY=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=x8qPBy2L3Q1T07Yf84b6tKLAWa7aCtQVuBt+NjiZAUONrkdWMiaiR18p/de9fHr0A
 TkpGJTB0jNZNYDl1LX2Zcien8cAHxZ7rXHBNURRV5Gq3K0A61LCixey3Pug7By1Yr9
 bXS5OhABCgdij+TOmfqUtIJ2d/7YxW5Hiaq+pcbclbQhsaAxt+ZIaI12PuKIPNf1f0
 1DA61NgNI2xrQER6OT7h69n9xb+IIlIsGy3g/fTDk2+zLSmEjOsDz96Tl0GdPiObid
 1h5h59gCcnkgwf5vBh8a12NbJ1kcM4yVDFpR/uJe+U1QXfLkFR5Z2NEzb2HvSuiZTo
 7t+NJyfTF0bmA==
From: Eshel Yaron <me@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>
Subject: Re: bug#73881: 31.0.50; Unexpected warnings about recursive
 occurrences of obsolete functions
In-Reply-To: <CADwFkm=XyGwV05LT9Y_TAAZXYWS+K24mK5GQk1UPh7SAvn0mLA@HIDDEN>
 (Stefan Kangas's message of "Mon, 28 Oct 2024 15:32:52 -0700")
References: <m1y12kdy99.fsf@HIDDEN> <86wmi4jh54.fsf@HIDDEN>
 <m134ksdkub.fsf@HIDDEN> <86jze4j6wh.fsf@HIDDEN>
 <jwva5ez8qrx.fsf-monnier+emacs@HIDDEN>
 <CADwFkmkxuKpZDKm28yZeredjoUBYTjSimTHGajjH1wZsf9x2Ag@HIDDEN>
 <jwv7c9tnz4t.fsf-monnier+emacs@HIDDEN>
 <CADwFkm=XyGwV05LT9Y_TAAZXYWS+K24mK5GQk1UPh7SAvn0mLA@HIDDEN>
Date: Tue, 29 Oct 2024 08:21:00 +0100
Message-ID: <m1wmhrml2b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73881
Cc: Eli Zaretskii <eliz@HIDDEN>, Andrea Corallo <acorallo@HIDDEN>,
 73881 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Kangas <stefankangas@HIDDEN> writes:

> Stefan Monnier <monnier@HIDDEN> writes:
>
>> I propose the patch below (which also fixes a leak of
>> `byte-compile-global-not-obsolete-vars` to code compiled from other
>> files).
>> But I don't think it fixes the OP's problem because
>>
>>     (macroexpand '(defun my-foo () (declare (obsolete "blabla" "25")) 42))
>> =>
>>     (prog1 (defalias 'my-foo #'(lambda nil ...))
>>       (make-obsolete 'my-foo '"blabla" "25"))
>>
>> IOW, the `make-obsolete` comes *after* the function and thus my new code
>> will only silence warnings for calls to `my-foo` that are present
>> *after* the function definition.
>
> It looks like a step in the right direction to me.

To me as well.  Would there any harm in emitting the make-obsolete form
above the defalias form to cover also the warnings for recursive calls?


Best,

Eshel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73881; Package emacs. Full text available.

Message received at 73881 <at> debbugs.gnu.org:


Received: (at 73881) by debbugs.gnu.org; 28 Oct 2024 22:34:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 28 18:34:02 2024
Received: from localhost ([127.0.0.1]:55034 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t5YJG-0000MG-6K
	for submit <at> debbugs.gnu.org; Mon, 28 Oct 2024 18:34:02 -0400
Received: from mail-ed1-f45.google.com ([209.85.208.45]:55577)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1t5YJD-0000Lt-Me
 for 73881 <at> debbugs.gnu.org; Mon, 28 Oct 2024 18:34:00 -0400
Received: by mail-ed1-f45.google.com with SMTP id
 4fb4d7f45d1cf-5c9693dc739so6518269a12.3
 for <73881 <at> debbugs.gnu.org>; Mon, 28 Oct 2024 15:33:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1730154774; x=1730759574; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=YU/4uLkjsMITTbNfBEEK6/M+jL8rkkXfv2e71r2PoJE=;
 b=JYh5uTc+ufOxjeSPNqD5/kT84sxMI+bZs1/CagdKfGEtYwLGCS7GOFcF+FDwHGg5oT
 KLoTOtHwk3r288rUx2uCQFQt1gbNx/s5Chnpg6xzjwTqW/rranmCRtOCyR8miFauT++5
 l5SCgl1oVXe3z/oUdM5YekGuWNw96mpeli7470BTyIykRqT+hf5AfGQyiRwG/ptGvctP
 Rj3j3Jmzk2Z32lPeCsEaklhemCzyDfTjJ8RSUDzHMm8tTGoEu7/XRIB7kC5/tE2C49z8
 bjR6W61f7AX8C4JfDbNNCFdT7hDiqOYhTdkPvTQMAN63Gm2pSCHnUp8XWjIr/Q2/YRXV
 EdLg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1730154774; x=1730759574;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=YU/4uLkjsMITTbNfBEEK6/M+jL8rkkXfv2e71r2PoJE=;
 b=Nnr07/OAIQwZBR3PxlaXbrCX2qkE/vFMxQz7aInw/IeTl4D8rwmo+A4pFolZlC8Wrt
 ofnJjp2qN+DKJuoO8w0smj6+PZqJfk4uanq1/7RTmlGKMIB7fRjL9i9qG7OGUGEAcSlg
 oNEOTVhimAojWzzE2nUg9qdM5rmSvgWkb9kpSY/mZh1lkAUdPmjYmaKSGYJBNGLgrZ46
 P6bIQ5zSrS4ukInE9KpqmmlHTv0vXobDhIWplOW7YdiD9evOqz3rDTbxpV1KXhSU9JUB
 MKtkobSanM/c9hHpeciFfSjoBsvzqBDBSg1x3fhiAEh+KqLJWG0D71OL3OwLnJwMzawy
 Ljtg==
X-Forwarded-Encrypted: i=1;
 AJvYcCUyZvTJkzXBv3MoOq9nx5awlreDmM72ROieeE0hSSfMsPso/XD40HZ3BKmNVe2jf+/w7rDlQg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yx1Zrau3SQH/du7V1E5vpl8kDWeCqA6kr68cu4J9AI4Yi+o5cV8
 quw2gHlzRFNF8gnkhPVZF8+2IS8ufllLWBr4dpGM8qZWypc7+NK1i3oQ4m09wDaQoSOvpWY3mcE
 +iqbUVldZIHAvyNK2uYjI5mXj3Dg=
X-Google-Smtp-Source: AGHT+IGXnGYSdvECOkMyzkBGgmN86MVGiJMZgsqaAcF1VeDteTpGEzW4xQdNKlNWCPrXNYVTfvm1pH82ydJcDYOfiFA=
X-Received: by 2002:a05:6402:2788:b0:5cb:615c:a6ca with SMTP id
 4fb4d7f45d1cf-5cbbf90e415mr7988103a12.28.1730154773644; Mon, 28 Oct 2024
 15:32:53 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Mon, 28 Oct 2024 15:32:52 -0700
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <jwv7c9tnz4t.fsf-monnier+emacs@HIDDEN>
References: <m1y12kdy99.fsf@HIDDEN> <86wmi4jh54.fsf@HIDDEN>
 <m134ksdkub.fsf@HIDDEN> <86jze4j6wh.fsf@HIDDEN>
 <jwva5ez8qrx.fsf-monnier+emacs@HIDDEN>
 <CADwFkmkxuKpZDKm28yZeredjoUBYTjSimTHGajjH1wZsf9x2Ag@HIDDEN>
 <jwv7c9tnz4t.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Date: Mon, 28 Oct 2024 15:32:52 -0700
Message-ID: <CADwFkm=XyGwV05LT9Y_TAAZXYWS+K24mK5GQk1UPh7SAvn0mLA@HIDDEN>
Subject: Re: bug#73881: 31.0.50; Unexpected warnings about recursive
 occurrences of obsolete functions
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73881
Cc: 73881 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 Andrea Corallo <acorallo@HIDDEN>, Eshel Yaron <me@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> I propose the patch below (which also fixes a leak of
> `byte-compile-global-not-obsolete-vars` to code compiled from other
> files).
> But I don't think it fixes the OP's problem because
>
>     (macroexpand '(defun my-foo () (declare (obsolete "blabla" "25")) 42))
> =>
>     (prog1 (defalias 'my-foo #'(lambda nil ...))
>       (make-obsolete 'my-foo '"blabla" "25"))
>
> IOW, the `make-obsolete` comes *after* the function and thus my new code
> will only silence warnings for calls to `my-foo` that are present
> *after* the function definition.

It looks like a step in the right direction to me.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73881; Package emacs. Full text available.

Message received at 73881 <at> debbugs.gnu.org:


Received: (at 73881) by debbugs.gnu.org; 27 Oct 2024 19:19:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 15:19:37 2024
Received: from localhost ([127.0.0.1]:46389 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t58nY-0006Ef-QF
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2024 15:19:37 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:43838)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1t58nW-0006EP-5h
 for 73881 <at> debbugs.gnu.org; Sun, 27 Oct 2024 15:19:34 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3A016100180;
 Sun, 27 Oct 2024 15:18:53 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1730056732;
 bh=t5yJUEI4nuoJuwwW6jci2MBlyT1i7od8K9SGdsTpl1A=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=lZXb+fgFWKRznxoW3wawAwN9SzEf436eb1JYCX5AkfQ5mHa4zbeymltNyzDjolsxx
 gnUmOZamio8EDoHURMqehXXB3hmBfnVX1rFCwPnEWHHDiy9UM03nEGiQfBbrHRZioN
 jvpLO61QwRPeOEuVolVYAP0ucNTc0IxEoryyAQ1+JCdUd6V0O6zxyF7TeX7Y3jUktI
 RW2rqU9ndIITd3TnfIioBsY797XkyBsO7lSTE9ViExqVB8s4uwh5z9Pjk6S2xwY8l/
 EzoIy9bNsrPL5n3r6Gs9LYGvP4xXrp+v+ofM3nceu6VOA5Q58vmXD0fgbJO3ftoE58
 QMoEGeX3i+vQg==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 5D21A100043;
 Sun, 27 Oct 2024 15:18:52 -0400 (EDT)
Received: from pastel (69-196-161-60.dsl.teksavvy.com [69.196.161.60])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 228A512013C;
 Sun, 27 Oct 2024 15:18:52 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>
Subject: Re: bug#73881: 31.0.50; Unexpected warnings about recursive
 occurrences of obsolete functions
In-Reply-To: <CADwFkmkxuKpZDKm28yZeredjoUBYTjSimTHGajjH1wZsf9x2Ag@HIDDEN>
 (Stefan Kangas's message of "Sun, 20 Oct 2024 04:51:53 -0700")
Message-ID: <jwv7c9tnz4t.fsf-monnier+emacs@HIDDEN>
References: <m1y12kdy99.fsf@HIDDEN> <86wmi4jh54.fsf@HIDDEN>
 <m134ksdkub.fsf@HIDDEN> <86jze4j6wh.fsf@HIDDEN>
 <jwva5ez8qrx.fsf-monnier+emacs@HIDDEN>
 <CADwFkmkxuKpZDKm28yZeredjoUBYTjSimTHGajjH1wZsf9x2Ag@HIDDEN>
Date: Sun, 27 Oct 2024 15:18:51 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.041 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 73881
Cc: 73881 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 Andrea Corallo <acorallo@HIDDEN>, Eshel Yaron <me@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> ..Hmm.. I think I see the problem: the code I wrote was for variables
>> rather than for functions:
>>
>>     ;; If foo.el declares `toto' as obsolete, it is likely that foo.el will
>>     ;; actually use `toto' in order for this obsolete variable to still work
>>     ;; correctly, so paradoxically, while byte-compiling foo.el, the presence
>>     ;; of a make-obsolete-variable call for `toto' is an indication that `toto'
>>     ;; should not trigger obsolete-warnings in foo.el.
>>     (byte-defop-compiler-1 make-obsolete-variable)
>>     (defun byte-compile-make-obsolete-variable (form)
>>       (when (eq 'quote (car-safe (nth 1 form)))
>>         (push (nth 1 (nth 1 form)) byte-compile-global-not-obsolete-vars))
>>       (byte-compile-normal-call form))
>>
>> So maybe we should just do the same for `make-obsolete`?
>
> I think that makes sense.

I propose the patch below (which also fixes a leak of
`byte-compile-global-not-obsolete-vars` to code compiled from other
files).
But I don't think it fixes the OP's problem because

    (macroexpand '(defun my-foo () (declare (obsolete "blabla" "25")) 42))
=>
    (prog1 (defalias 'my-foo #'(lambda nil ...))
      (make-obsolete 'my-foo '"blabla" "25"))

IOW, the `make-obsolete` comes *after* the function and thus my new code
will only silence warnings for calls to `my-foo` that are present
*after* the function definition.


        Stefan


diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index f058fc48cc7..efa1ea6b676 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -433,8 +433,6 @@ byte-compile-interactive-only-functions
 
 (defvar byte-compile-not-obsolete-vars nil
   "List of variables that shouldn't be reported as obsolete.")
-(defvar byte-compile-global-not-obsolete-vars nil
-  "Global list of variables that shouldn't be reported as obsolete.")
 
 (defvar byte-compile-not-obsolete-funcs nil
   "List of functions that shouldn't be reported as obsolete.")
@@ -1909,6 +1907,8 @@ byte-compile-close-variables
          (byte-compile-const-variables nil)
          (byte-compile-free-references nil)
          (byte-compile-free-assignments nil)
+         (byte-compile-not-obsolete-vars nil)
+         (byte-compile-not-obsolete-funcs nil)
          ;;
          ;; Close over these variables so that `byte-compiler-options'
          ;; can change them on a per-file basis.
@@ -2764,6 +2764,8 @@ byte-compile-file-form-with-suppressed-warnings
 ;; Automatically evaluate define-obsolete-function-alias etc at top-level.
 (put 'make-obsolete 'byte-hunk-handler 'byte-compile-file-form-make-obsolete)
 (defun byte-compile-file-form-make-obsolete (form)
+  (when (eq 'quote (car-safe (nth 1 form)))
+    (push (nth 1 (nth 1 form)) byte-compile-not-obsolete-funcs))
   (prog1 (byte-compile-keep-pending form)
     (apply 'make-obsolete
            (mapcar 'eval (cdr form)))))
@@ -3808,7 +3810,6 @@ byte-compile-check-variable
 	((let ((od (get var 'byte-obsolete-variable)))
            (and od
                 (not (memq var byte-compile-not-obsolete-vars))
-                (not (memq var byte-compile-global-not-obsolete-vars))
                 (not (memq var byte-compile-lexical-variables))
                 (pcase (nth 1 od)
                   ('set (not (eq access-type 'reference)))
@@ -5068,7 +5069,7 @@ lambda
 (byte-defop-compiler-1 make-obsolete-variable)
 (defun byte-compile-make-obsolete-variable (form)
   (when (eq 'quote (car-safe (nth 1 form)))
-    (push (nth 1 (nth 1 form)) byte-compile-global-not-obsolete-vars))
+    (push (nth 1 (nth 1 form)) byte-compile-not-obsolete-vars))
   (byte-compile-normal-call form))
 
 (defun byte-compile-defvar (form &optional toplevel)





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73881; Package emacs. Full text available.

Message received at 73881 <at> debbugs.gnu.org:


Received: (at 73881) by debbugs.gnu.org; 20 Oct 2024 11:53:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 20 07:53:26 2024
Received: from localhost ([127.0.0.1]:46167 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t2UUw-0003HK-1g
	for submit <at> debbugs.gnu.org; Sun, 20 Oct 2024 07:53:26 -0400
Received: from mail-ed1-f50.google.com ([209.85.208.50]:47117)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1t2UUu-0003H3-To
 for 73881 <at> debbugs.gnu.org; Sun, 20 Oct 2024 07:53:25 -0400
Received: by mail-ed1-f50.google.com with SMTP id
 4fb4d7f45d1cf-5c94c4ad9d8so4598018a12.2
 for <73881 <at> debbugs.gnu.org>; Sun, 20 Oct 2024 04:52:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1729425114; x=1730029914; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=pliQgQigVJFM+AsXHEtc8/Mz9aHCNTjM2IFI4B71yRs=;
 b=DKIH8jMH/+DrY+ZcqJ21/u37wBziaexE8fidY2rjJv+j/HmrleucwRjqCVJD7nHLy+
 jfZPwHYDXcW5F6aw35ocq2sBCLSdN8aJyfXf24uwBEIUNs+JDjhBQ5O7LzZsMR0N5qUK
 VOHuxw4J76R7+B5skMM/SIYe9YRmMzax058MWQh4W81dyDYumAQPHQsm0mQFr0FlknNP
 5u3jewCB2fdZD0ilBAJimDj3XsN8D5peW1WtzfzWz9TvZe0LTs9bEsU7DoA0TqM9edbQ
 SxRHx1yUJzEVcGCtXK6cu0DgSJ+gb8E2udyAFsYQXC+xg08Rv/yVF1UuTCagrMgUt3Dn
 Z3oA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1729425114; x=1730029914;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=pliQgQigVJFM+AsXHEtc8/Mz9aHCNTjM2IFI4B71yRs=;
 b=qrSvhHZYDXHUCB2kFfw65pHqpl6WLaVjTM0z17BaxrmnY9N2rRQG/fK5pL6qkRVJWV
 xzAwOiWzk4JgyJ9rFaHjLn35JjocJgRxBeKhAn8gkhTEi6xDSXTem/1ntmPk66/9oPmZ
 ZnYNS97AXqI8z+6KGE9z6uF6ZvneDID7Nbz7XkERTxPzrKN7YoGGyXv198YvbkN2Lu0i
 9/UHag0v1EL+uG7YPCuuEzHy5LMHFqwP5zWcL2qhUkf92qtDTcTQT8UtR/g+LzO++JuI
 HN18LnmfC9/JYAproKwMX9dzHZKPTnU2m0RRE7PsRNgCvYgVTgKZXIkURV9TyJgf3YMi
 lXWw==
X-Forwarded-Encrypted: i=1;
 AJvYcCUaVTbI7OsOAPRTiCu+1Fq5VIUaQ2fKqb2owViiH9WE1jWuowMJAngGYeMaWURu5srdtOdyRQ==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yy84vk81XYeK075bluxurfLJ6WYFPkQo0sDtqIvgPGHHtrLPW3M
 btmuip1KkJwtxmzJmgcBXq98eekZbebajtooihf72m7uFsQ8pis5nazR0RqOilu75ZWMK7oviY4
 KPzOVi4GZbyr0eV7bYwLvVXD8c1U=
X-Google-Smtp-Source: AGHT+IE6UebnSYzRrWZUsV2krDVcPCavK4uzNyDNEb6IQ/RUqH7N2oCki+Bk3oT8hK1QZjC2OQ9TUBcUEqYNZhtglVs=
X-Received: by 2002:a05:6402:378f:b0:5cb:6b86:82d with SMTP id
 4fb4d7f45d1cf-5cb6b8608dcmr150894a12.36.1729425113905; Sun, 20 Oct 2024
 04:51:53 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sun, 20 Oct 2024 04:51:53 -0700
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <jwva5ez8qrx.fsf-monnier+emacs@HIDDEN>
References: <m1y12kdy99.fsf@HIDDEN> <86wmi4jh54.fsf@HIDDEN>
 <m134ksdkub.fsf@HIDDEN> <86jze4j6wh.fsf@HIDDEN>
 <jwva5ez8qrx.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Date: Sun, 20 Oct 2024 04:51:53 -0700
Message-ID: <CADwFkmkxuKpZDKm28yZeredjoUBYTjSimTHGajjH1wZsf9x2Ag@HIDDEN>
Subject: Re: bug#73881: 31.0.50; Unexpected warnings about recursive
 occurrences of obsolete functions
To: Stefan Monnier <monnier@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73881
Cc: 73881 <at> debbugs.gnu.org, Andrea Corallo <acorallo@HIDDEN>,
 Eshel Yaron <me@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> ..Hmm.. I think I see the problem: the code I wrote was for variables
> rather than for functions:
>
>     ;; If foo.el declares `toto' as obsolete, it is likely that foo.el will
>     ;; actually use `toto' in order for this obsolete variable to still work
>     ;; correctly, so paradoxically, while byte-compiling foo.el, the presence
>     ;; of a make-obsolete-variable call for `toto' is an indication that `toto'
>     ;; should not trigger obsolete-warnings in foo.el.
>     (byte-defop-compiler-1 make-obsolete-variable)
>     (defun byte-compile-make-obsolete-variable (form)
>       (when (eq 'quote (car-safe (nth 1 form)))
>         (push (nth 1 (nth 1 form)) byte-compile-global-not-obsolete-vars))
>       (byte-compile-normal-call form))
>
> So maybe we should just do the same for `make-obsolete`?

I think that makes sense.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73881; Package emacs. Full text available.

Message received at 73881 <at> debbugs.gnu.org:


Received: (at 73881) by debbugs.gnu.org; 20 Oct 2024 07:08:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 20 03:08:38 2024
Received: from localhost ([127.0.0.1]:45552 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t2Q3K-000762-0y
	for submit <at> debbugs.gnu.org; Sun, 20 Oct 2024 03:08:38 -0400
Received: from mail.eshelyaron.com ([107.175.124.16]:40268 helo=eshelyaron.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1t2Q3G-00075q-0M
 for 73881 <at> debbugs.gnu.org; Sun, 20 Oct 2024 03:08:36 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1729408088;
 bh=fNVC86WwQn9Y5oPtCIXHtvB3T2ITIbKWz76VixaaFiA=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=MfG6Kj0AV446fg04EFaQ6M1b3UdbCM7Riv57dBbNiWK1nkb1ZnGNBX6FH1vpegxT6
 CxtzKi/EFTzgjTpbdFaPafuFVBlec8gyfvzOHlvhm5+zgNleMPqOL6rbvAXxclnjCR
 /98WJD0ZH6HKNOtIL5bRFEqrQP3gpaUNTCxws/KeqzVpNV/Klwm80ED1ft8h7fhre9
 aG1NccjqfScmXRkMYnFUOykyw9AAYptBl0MYD3LLFfu9G+4bnEUUNPOtm1VzWYKQ5X
 acw6WtMgG8vQ43IWthZWR5fk2BrZM8SaZrfghfUyxLjlK9LV/MrYafewwIZJdGPyMm
 FJ30yWCycVOwg==
From: Eshel Yaron <me@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#73881: 31.0.50; Unexpected warnings about recursive
 occurrences of obsolete functions
In-Reply-To: <jwva5ez8qrx.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Sat, 19 Oct 2024 22:24:57 -0400")
References: <m1y12kdy99.fsf@HIDDEN> <86wmi4jh54.fsf@HIDDEN>
 <m134ksdkub.fsf@HIDDEN> <86jze4j6wh.fsf@HIDDEN>
 <jwva5ez8qrx.fsf-monnier+emacs@HIDDEN>
Date: Sun, 20 Oct 2024 09:08:05 +0200
Message-ID: <m1ed4bckve.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73881
Cc: Eli Zaretskii <eliz@HIDDEN>, Andrea Corallo <acorallo@HIDDEN>,
 73881 <at> debbugs.gnu.org, Stefan Kangas <stefankangas@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

Stefan Monnier <monnier@HIDDEN> writes:

> Hmm... I distinctly remember writing code to try and silence
> obsolescence warnings in the code coming from the same file as the
> `make-obsolete` call.

Ah good, sounds like a reasonable heuristic.

> If I installed that code into Emacs, clearly it's not doing its job.
>
> ..Hmm.. I think I see the problem: the code I wrote was for variables
> rather than for functions:
>
>     ;; If foo.el declares `toto' as obsolete, it is likely that foo.el will
>     ;; actually use `toto' in order for this obsolete variable to still work
>     ;; correctly, so paradoxically, while byte-compiling foo.el, the presence
>     ;; of a make-obsolete-variable call for `toto' is an indication that `toto'
>     ;; should not trigger obsolete-warnings in foo.el.
>     (byte-defop-compiler-1 make-obsolete-variable)
>     (defun byte-compile-make-obsolete-variable (form)
>       (when (eq 'quote (car-safe (nth 1 form)))
>         (push (nth 1 (nth 1 form)) byte-compile-global-not-obsolete-vars))
>       (byte-compile-normal-call form))
>
> So maybe we should just do the same for `make-obsolete`?

SGTM.


Thanks,

Eshel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73881; Package emacs. Full text available.

Message received at 73881 <at> debbugs.gnu.org:


Received: (at 73881) by debbugs.gnu.org; 20 Oct 2024 02:25:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 19 22:25:39 2024
Received: from localhost ([127.0.0.1]:45267 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t2LdT-00020r-9O
	for submit <at> debbugs.gnu.org; Sat, 19 Oct 2024 22:25:39 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:56968)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1t2LdP-0001w7-SK
 for 73881 <at> debbugs.gnu.org; Sat, 19 Oct 2024 22:25:37 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 98405100180;
 Sat, 19 Oct 2024 22:25:05 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1729391104;
 bh=tTO0wqeopS7kTTGApvRVvldL2f2rOPPTinkvj1mauUs=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=IrwQvwv3kD6JUGEAsDwXzBwAYqRDXXPmc10xGav8o/zdqreTh+jDQLz5dN9S7mc+f
 wJg4nYlgshDgzRnfBCt/up4nhm8OHTv0pq717b7FkS8l9nJ1bOiZbaOE2PN7+ka4bM
 4YnrjBbgZkic9B0xxMJBtfUa18AWT6ow86Thj6VzYeRmjLSyfpx2K3xGL9g2JF8e1f
 eJ1oWVxjdANGBR96GDg6x7K3r8hVknmHmId+pXuoiIP/3WXF+DpJB1B91nQdKzx4fX
 vXqmZU3h3lD/KAdAWbbOjdo8vaFqqXqB9d5aSDH0OCK0lOkL9IF4wOKhaM8DY5uKlx
 kFuaeeCEK1M0A==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4A34E100043;
 Sat, 19 Oct 2024 22:25:04 -0400 (EDT)
Received: from pastel (69-196-161-60.dsl.teksavvy.com [69.196.161.60])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1006512033B;
 Sat, 19 Oct 2024 22:25:04 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#73881: 31.0.50; Unexpected warnings about recursive
 occurrences of obsolete functions
In-Reply-To: <86jze4j6wh.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 19 Oct
 2024 21:15:42 +0300")
Message-ID: <jwva5ez8qrx.fsf-monnier+emacs@HIDDEN>
References: <m1y12kdy99.fsf@HIDDEN> <86wmi4jh54.fsf@HIDDEN>
 <m134ksdkub.fsf@HIDDEN> <86jze4j6wh.fsf@HIDDEN>
Date: Sat, 19 Oct 2024 22:24:57 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.036 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 73881
Cc: 73881 <at> debbugs.gnu.org, Andrea Corallo <acorallo@HIDDEN>,
 Eshel Yaron <me@HIDDEN>, Stefan Kangas <stefankangas@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> As for an easy fix, maybe something like this?
>> 
>> diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
>> index 29e7882c851..edb8160a250 100644
>> --- a/lisp/emacs-lisp/bytecomp.el
>> +++ b/lisp/emacs-lisp/bytecomp.el
>> @@ -1533,6 +1533,7 @@ byte-compile-arglist-signature-string
>>  
>>  (defun byte-compile-function-warn (f nargs def)
>>    (when (and (get f 'byte-obsolete-info)
>> +             (not (eq f byte-compile-current-form)) ; Recursive call.
>>               (not (memq f byte-compile-not-obsolete-funcs)))
>>      (byte-compile-warn-obsolete f "function"))
>
> Thanks, let's see what others think about this.

Hmm... I distinctly remember writing code to try and silence
obsolescence warnings in the code coming from the same file as the
`make-obsolete` call.

If I installed that code into Emacs, clearly it's not doing its job.

..Hmm.. I think I see the problem: the code I wrote was for variables
rather than for functions:

    ;; If foo.el declares `toto' as obsolete, it is likely that foo.el will
    ;; actually use `toto' in order for this obsolete variable to still work
    ;; correctly, so paradoxically, while byte-compiling foo.el, the presence
    ;; of a make-obsolete-variable call for `toto' is an indication that `toto'
    ;; should not trigger obsolete-warnings in foo.el.
    (byte-defop-compiler-1 make-obsolete-variable)
    (defun byte-compile-make-obsolete-variable (form)
      (when (eq 'quote (car-safe (nth 1 form)))
        (push (nth 1 (nth 1 form)) byte-compile-global-not-obsolete-vars))
      (byte-compile-normal-call form))

So maybe we should just do the same for `make-obsolete`?


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73881; Package emacs. Full text available.

Message received at 73881 <at> debbugs.gnu.org:


Received: (at 73881) by debbugs.gnu.org; 19 Oct 2024 18:16:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 19 14:16:21 2024
Received: from localhost ([127.0.0.1]:44749 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t2Dzw-0004zv-JR
	for submit <at> debbugs.gnu.org; Sat, 19 Oct 2024 14:16:21 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35024)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1t2Dzu-0004zf-IJ
 for 73881 <at> debbugs.gnu.org; Sat, 19 Oct 2024 14:16:19 -0400
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 <eliz@HIDDEN>)
 id 1t2DzO-0007N4-KM; Sat, 19 Oct 2024 14:15:47 -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=xPM9PdNk6WvUDWTvTc6TDHMfIB+CARXQtgmXD5rUlWg=; b=MSwr1AN9Qx7e4AfRyXxn
 CvB7tidxzEnV7hX4a5Q9NqhptqFvhi7OX011D4TVzcea9A2XCPNRqaS7zpdIuCrMYS87h2o4+f4Ki
 sRXa9ts88JJaLEWHktJEOIO8+34T5jVhnhLVODqc1TagpdC+LwTzebV/H1zlbwtuWzzwKERzHLOCk
 B1igARZURrIvNYi7JsVXMzvnxfq2W9sqsDvvS5whj5CpyyluPzLWe+ziUyKa46fa72ZW/+G+b1pgx
 u7c7is3uScabZAqkNrvm2SVjutUHGI5x/6OMAn/MPne5G9oq4J2VDgGv8CAlSJaCjnZ55ntWuJVNd
 bsass2b/BZ+SHg==;
Date: Sat, 19 Oct 2024 21:15:42 +0300
Message-Id: <86jze4j6wh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Eshel Yaron <me@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 Stefan Kangas <stefankangas@HIDDEN>, Andrea Corallo <acorallo@HIDDEN>
In-Reply-To: <m134ksdkub.fsf@HIDDEN> (message from Eshel Yaron on
 Sat, 19 Oct 2024 20:11:08 +0200)
Subject: Re: bug#73881: 31.0.50; Unexpected warnings about recursive
 occurrences of obsolete functions
References: <m1y12kdy99.fsf@HIDDEN> <86wmi4jh54.fsf@HIDDEN>
 <m134ksdkub.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 73881
Cc: 73881 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Eshel Yaron <me@HIDDEN>
> Cc: 73881 <at> debbugs.gnu.org
> Date: Sat, 19 Oct 2024 20:11:08 +0200
> 
> >> In allout-old-expose-topic:
> >> allout.el:5092:29: Warning: ¡®allout-old-expose-topic¡¯ is an obsolete function
> >>     (as of 28.1); use ¡®allout-expose-topic¡¯ instead.
> >> allout.el:5097:44: Warning: ¡®allout-old-expose-topic¡¯ is an obsolete function
> >>     (as of 28.1); use ¡®allout-expose-topic¡¯ instead.
> >> allout.el:5106:8: Warning: ¡®allout-old-expose-topic¡¯ is an obsolete function
> >>     (as of 28.1); use ¡®allout-expose-topic¡¯ instead.
> >> --8<---------------cut here---------------end--------------->8---
> >> 
> >> These warnings are unhelpful since these are recursive calls within the
> >> definition of the obsolete function itself.  They need not be replaced
> >> with another function as the warnings suggest.  Ideally, recursive calls
> >> to obsolete functions should not produce such warnings.
> >
> > From where I stand, this could be closed as wontfix, unless someone
> > sees an easy fix.  I don't see any harm from emitting these warnings
> > in this scenario.  The warnings are correct.
> 
> All right, FWIW I find them more distracting then helpful: if I'm
> declaring a function as obsolete, that means it's going to stay around
> for at least a short while, with its recursive calls, which I have no
> interest in adapting.  So these warnings do not tell me anything useful.
> 
> As for an easy fix, maybe something like this?
> 
> diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
> index 29e7882c851..edb8160a250 100644
> --- a/lisp/emacs-lisp/bytecomp.el
> +++ b/lisp/emacs-lisp/bytecomp.el
> @@ -1533,6 +1533,7 @@ byte-compile-arglist-signature-string
>  
>  (defun byte-compile-function-warn (f nargs def)
>    (when (and (get f 'byte-obsolete-info)
> +             (not (eq f byte-compile-current-form)) ; Recursive call.
>               (not (memq f byte-compile-not-obsolete-funcs)))
>      (byte-compile-warn-obsolete f "function"))

Thanks, let's see what others think about this.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73881; Package emacs. Full text available.

Message received at 73881 <at> debbugs.gnu.org:


Received: (at 73881) by debbugs.gnu.org; 19 Oct 2024 18:11:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 19 14:11:38 2024
Received: from localhost ([127.0.0.1]:44733 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t2DvN-0004lK-TG
	for submit <at> debbugs.gnu.org; Sat, 19 Oct 2024 14:11:38 -0400
Received: from mail.eshelyaron.com ([107.175.124.16]:60250 helo=eshelyaron.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1t2DvL-0004lB-CC
 for 73881 <at> debbugs.gnu.org; Sat, 19 Oct 2024 14:11:36 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1729361470;
 bh=G3tU+vE9ZLpCy3z7epmLZajtCmly3mumbv57/mTaVGg=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=IrdVLwoa7M+H2y6WwSFJWynAPZcqFooK4Wy+zb7QOLjqgn+t5WvrIpHK6aRnDxD7P
 EprqoExpMd//m+jSO+B3SaRGw/rpiMAHy/0EvGzoGgYTMwLHvd71SnnVgwweIJumEL
 bBXQXbnyTvJ5NrWO11GpSENQ9UqTh3fNAmWD05wFVGW0N8j1B53lShw+z13TRqnyM2
 BglOlVgEwezTY/rwdUbTEBHQ7FPTEHEysMOCWM+Oql+kC3NuNMjy2HK4bWY798M3TB
 g5aLxx4q1gdUMjI7G67Wyj/7Cl6g9ODWFignF9poLNPyZk5nUCvg/DlbOr5lmabNEu
 +H8w+NPNSlm+Q==
From: Eshel Yaron <me@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#73881: 31.0.50; Unexpected warnings about recursive
 occurrences of obsolete functions
In-Reply-To: <86wmi4jh54.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 19 Oct
 2024 17:34:31 +0300")
References: <m1y12kdy99.fsf@HIDDEN> <86wmi4jh54.fsf@HIDDEN>
X-Hashcash: 1:20:241019:eliz@HIDDEN::XG1HFUrCtZPZBmKk:cRK
X-Hashcash: 1:20:241019:73881 <at> debbugs.gnu.org::qKhfMC0kdoZbsRAx:fJD
Date: Sat, 19 Oct 2024 20:11:08 +0200
Message-ID: <m134ksdkub.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73881
Cc: 73881 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

Eli Zaretskii <eliz@HIDDEN> writes:

>> Date: Sat, 19 Oct 2024 15:21:22 +0200
>> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>>=20
>>=20
>> 1. emacs -Q
>> 2. (require 'allout) or otherwise load allout.el
>> 3. Byte-compile allout.el with M-x byte-compile-file
>> 4. See warnings:
>>=20
>> --8<---------------cut here---------------start------------->8---
>> In allout-old-expose-topic:
>> allout.el:5092:29: Warning: =A1=AEallout-old-expose-topic=A1=AF is an ob=
solete function
>>     (as of 28.1); use =A1=AEallout-expose-topic=A1=AF instead.
>> allout.el:5097:44: Warning: =A1=AEallout-old-expose-topic=A1=AF is an ob=
solete function
>>     (as of 28.1); use =A1=AEallout-expose-topic=A1=AF instead.
>> allout.el:5106:8: Warning: =A1=AEallout-old-expose-topic=A1=AF is an obs=
olete function
>>     (as of 28.1); use =A1=AEallout-expose-topic=A1=AF instead.
>> --8<---------------cut here---------------end--------------->8---
>>=20
>> These warnings are unhelpful since these are recursive calls within the
>> definition of the obsolete function itself.  They need not be replaced
>> with another function as the warnings suggest.  Ideally, recursive calls
>> to obsolete functions should not produce such warnings.
>
> From where I stand, this could be closed as wontfix, unless someone
> sees an easy fix.  I don't see any harm from emitting these warnings
> in this scenario.  The warnings are correct.

All right, FWIW I find them more distracting then helpful: if I'm
declaring a function as obsolete, that means it's going to stay around
for at least a short while, with its recursive calls, which I have no
interest in adapting.  So these warnings do not tell me anything useful.

As for an easy fix, maybe something like this?

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 29e7882c851..edb8160a250 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1533,6 +1533,7 @@ byte-compile-arglist-signature-string
=20
 (defun byte-compile-function-warn (f nargs def)
   (when (and (get f 'byte-obsolete-info)
+             (not (eq f byte-compile-current-form)) ; Recursive call.
              (not (memq f byte-compile-not-obsolete-funcs)))
     (byte-compile-warn-obsolete f "function"))
=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73881; Package emacs. Full text available.

Message received at 73881 <at> debbugs.gnu.org:


Received: (at 73881) by debbugs.gnu.org; 19 Oct 2024 14:35:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 19 10:35:20 2024
Received: from localhost ([127.0.0.1]:44249 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t2AY3-0003OA-KW
	for submit <at> debbugs.gnu.org; Sat, 19 Oct 2024 10:35:19 -0400
Received: from eggs.gnu.org ([209.51.188.92]:38852)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1t2AY1-0003Nx-K9
 for 73881 <at> debbugs.gnu.org; Sat, 19 Oct 2024 10:35:18 -0400
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 <eliz@HIDDEN>)
 id 1t2AXY-0005xL-6o; Sat, 19 Oct 2024 10:34:48 -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=KV68yfvqBanCnvcoSPfUShprRYZqxA4WP8y112b8rEo=; b=iEKK434G5hBdEDu1eUGD
 9rXctOJ81vMVZR9713vQuEVAyB1MPVOyBOG0xipzolI2ARCFA+4/b7JC3WMrFulZAmOGsaGcn78c6
 K+i+pdoaSK/o2TJVCZW84lhnPBUBbejy0NMxL2bebxE96J+781lolJm1XAfM6IRxdfLQlhHx9x3KF
 TfquwP15LhXlabTsboi1Vw1op4jW8eRoNAZpDjF6jcKfrTLhiYXMiO8KluPLyTT1AgktfYl4D41O3
 Pl6whQB5LmoAncskhOSPwt0yCUnOESajFOZPnQHxcBMSPLu3UMYS6tG1ZIO0GxtG93yq65jZEPZyN
 VGPNLOy5TiJL4Q==;
Date: Sat, 19 Oct 2024 17:34:31 +0300
Message-Id: <86wmi4jh54.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
In-Reply-To: <m1y12kdy99.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#73881: 31.0.50;
 Unexpected warnings about recursive occurrences of obsolete functions
References: <m1y12kdy99.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 73881
Cc: 73881 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sat, 19 Oct 2024 15:21:22 +0200
> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> 
> 1. emacs -Q
> 2. (require 'allout) or otherwise load allout.el
> 3. Byte-compile allout.el with M-x byte-compile-file
> 4. See warnings:
> 
> --8<---------------cut here---------------start------------->8---
> In allout-old-expose-topic:
> allout.el:5092:29: Warning: ¡®allout-old-expose-topic¡¯ is an obsolete function
>     (as of 28.1); use ¡®allout-expose-topic¡¯ instead.
> allout.el:5097:44: Warning: ¡®allout-old-expose-topic¡¯ is an obsolete function
>     (as of 28.1); use ¡®allout-expose-topic¡¯ instead.
> allout.el:5106:8: Warning: ¡®allout-old-expose-topic¡¯ is an obsolete function
>     (as of 28.1); use ¡®allout-expose-topic¡¯ instead.
> --8<---------------cut here---------------end--------------->8---
> 
> These warnings are unhelpful since these are recursive calls within the
> definition of the obsolete function itself.  They need not be replaced
> with another function as the warnings suggest.  Ideally, recursive calls
> to obsolete functions should not produce such warnings.

From where I stand, this could be closed as wontfix, unless someone
sees an easy fix.  I don't see any harm from emitting these warnings
in this scenario.  The warnings are correct.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73881; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Oct 2024 13:24:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 19 09:24:08 2024
Received: from localhost ([127.0.0.1]:41880 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t29RA-0007y4-EO
	for submit <at> debbugs.gnu.org; Sat, 19 Oct 2024 09:24:08 -0400
Received: from lists.gnu.org ([209.51.188.17]:55036)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1t29R8-0007xu-Dz
 for submit <at> debbugs.gnu.org; Sat, 19 Oct 2024 09:24:07 -0400
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 <me@HIDDEN>) id 1t29OZ-0004AY-M1
 for bug-gnu-emacs@HIDDEN; Sat, 19 Oct 2024 09:21:28 -0400
Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1t29OY-0005la-2n
 for bug-gnu-emacs@HIDDEN; Sat, 19 Oct 2024 09:21:27 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1729344084;
 bh=BtmLUCoPfwQehpowk6gGC+2wv26IMi3bgvP3zXfXw8s=;
 h=From:To:Subject:Date:From;
 b=nS+Rl3XBk1pCQ2T1NyeJP4SEV2pHWPEH6g1ERKlPi6VJfNepNFq6TfFTngKYN/IjA
 hcEUgqOUWnzIJ0Wa4BvPr46qCATafeaXTX9uoR3kdwXQsm3zF6vBc6aSMnCcoTXMmD
 2YpnotWpP+VjrRQpOHjto1iFKh9KcmTq0P13KUiCINpU8w4okCso3uj59/9InK7iX8
 HMXKkPjCbuLeoB3Wml02uA3xIefda/I/H+SWwn9Hwk9o9tFxVYclPeiKfgz2Dnnt8i
 SFI97dPmjYjJLrbOHJIo8lY71jT1RZHW3foFwsCLI6Oh8XL5wLvgTOaYOoIADSJAsh
 w5dq+SJPcCb0A==
From: Eshel Yaron <me@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 31.0.50; Unexpected warnings about recursive occurrences of
 obsolete functions
X-Debbugs-Cc: 
X-Hashcash: 1:20:241019:bug-gnu-emacs@HIDDEN::e2xhNoOdYiz2+Nk1:Jx3s
Date: Sat, 19 Oct 2024 15:21:22 +0200
Message-ID: <m1y12kdy99.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@HIDDEN;
 helo=eshelyaron.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)


1. emacs -Q
2. (require 'allout) or otherwise load allout.el
3. Byte-compile allout.el with M-x byte-compile-file
4. See warnings:

--8<---------------cut here---------------start------------->8---
In allout-old-expose-topic:
allout.el:5092:29: Warning: =A1=AEallout-old-expose-topic=A1=AF is an obsol=
ete function
    (as of 28.1); use =A1=AEallout-expose-topic=A1=AF instead.
allout.el:5097:44: Warning: =A1=AEallout-old-expose-topic=A1=AF is an obsol=
ete function
    (as of 28.1); use =A1=AEallout-expose-topic=A1=AF instead.
allout.el:5106:8: Warning: =A1=AEallout-old-expose-topic=A1=AF is an obsole=
te function
    (as of 28.1); use =A1=AEallout-expose-topic=A1=AF instead.
--8<---------------cut here---------------end--------------->8---

These warnings are unhelpful since these are recursive calls within the
definition of the obsolete function itself.  They need not be replaced
with another function as the warnings suggest.  Ideally, recursive calls
to obsolete functions should not produce such warnings.


Best,

Eshel




Acknowledgement sent to Eshel Yaron <me@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#73881; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.