From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73881: 31.0.50; Unexpected warnings about recursive occurrences of obsolete functions Date: Sat, 19 Oct 2024 20:11:08 +0200 Message-ID: References: <86wmi4jh54.fsf@gnu.org> Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1364"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73881@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 19 20:11:59 2024 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 1t2Dvj-0000DA-0P for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Oct 2024 20:11:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2DvQ-0001Z3-RX; Sat, 19 Oct 2024 14:11:40 -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 1t2DvP-0001Yf-8y for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 14:11:39 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t2DvO-0006nC-T5 for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 14:11:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=RWuTICPGnJh2yhmn5Aw8xuwoh01evz8H0Pcqh8UG1Zo=; b=f35KxiNM3OQj0gh7WzWT5S+z7STFeE8tIygbAYRtSRcyblRk5g4gBVkM219exbutpL8vf/tsKE8E2ZqJDYy0o2f7R7TrBaPTCysMFCjVAOwtNbYfciu4wuQhjoHqnE5irvxN2DUQSHsxxc5yebLhAg6qg/ZDrrjnXVCLm+dAx+qvb+72LKgG30dM1xDcybuAUh8k3QrfYJwB4r5j1F6Fh4Nkf/R2O9nYAvpyGDZeGGH55wuffgDJQ07RJF+d4MFhdXbxBR6r21KlHru0UQBnJJhE/zIhM4/1PWR9HnLMMuvyfhVCCL8XYIip+Z/FmCAUHfsu3nEHYyqDD+aQAA7emQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2Dvl-0004mN-RW for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 14:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Oct 2024 18:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73881 X-GNU-PR-Package: emacs Original-Received: via spool by 73881-submit@debbugs.gnu.org id=B73881.172936149818314 (code B ref 73881); Sat, 19 Oct 2024 18:12:01 +0000 Original-Received: (at 73881) by debbugs.gnu.org; 19 Oct 2024 18:11:38 +0000 Original-Received: from localhost ([127.0.0.1]:44733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2DvN-0004lK-TG for submit@debbugs.gnu.org; Sat, 19 Oct 2024 14:11:38 -0400 Original-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 ) id 1t2DvL-0004lB-CC for 73881@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== In-Reply-To: <86wmi4jh54.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Oct 2024 17:34:31 +0300") X-Hashcash: 1:20:241019:eliz@gnu.org::XG1HFUrCtZPZBmKk:cRK X-Hashcash: 1:20:241019:73881@debbugs.gnu.org::qKhfMC0kdoZbsRAx:fJD 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:293904 Archived-At: Hi, Eli Zaretskii 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" >>=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