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#73881: 31.0.50; Unexpected warnings about recursive occurrences of obsolete functions Date: Sat, 19 Oct 2024 21:15:42 +0300 Message-ID: <86jze4j6wh.fsf@gnu.org> References: <86wmi4jh54.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20215"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73881@debbugs.gnu.org To: Eshel Yaron , Stefan Monnier , Stefan Kangas , Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 19 20:16: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 1t2E0Z-00053T-FQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Oct 2024 20:16:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2E0F-00020Y-Qv; Sat, 19 Oct 2024 14:16:39 -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 1t2E0E-00020M-FN for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 14:16:38 -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 1t2E0E-0007SP-7P for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 14:16:38 -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:References:In-Reply-To:From:Date:To:Subject; bh=xPM9PdNk6WvUDWTvTc6TDHMfIB+CARXQtgmXD5rUlWg=; b=CFclJLJB+639fHM40fdqZXqTKYnK8DthAFwLgehXPYxVhuPlxZUJ7bhcRB/ENYm5B/Mv1zUTVXsT9HlJkhARvX3WBtrM470VArQ+n7yt2XXl3eLywVVaVdBo5rRCsCFOuL9Bw6B1f59ysG9D/4dlR2Ri1d2YkJw2RBPILWUnTMaZf3jFrBa8FNCweTIoW4E1OfTAiGqkn7DwttuXkZQEHpKkZ2YF0Or33lS0C1/qq3B8TjxTCrNG9MFL6pVU7KHQrDal6gi/rCKHBNov2ugDSu5FjRv05UqVf3fI5QC7s4YVCQITXLcik+Z1OqTWRt+bIsKzXNMgbd+kYU/IT1rGug==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2E0c-000516-5v for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 14:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Oct 2024 18:17:02 +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.172936178119219 (code B ref 73881); Sat, 19 Oct 2024 18:17:02 +0000 Original-Received: (at 73881) by debbugs.gnu.org; 19 Oct 2024 18:16:21 +0000 Original-Received: from localhost ([127.0.0.1]:44749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Dzw-0004zv-JR for submit@debbugs.gnu.org; Sat, 19 Oct 2024 14:16:21 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Dzu-0004zf-IJ for 73881@debbugs.gnu.org; Sat, 19 Oct 2024 14:16:19 -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 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==; In-Reply-To: (message from Eshel Yaron on Sat, 19 Oct 2024 20:11:08 +0200) 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:293905 Archived-At: > From: Eshel Yaron > Cc: 73881@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.