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: Tue, 29 Oct 2024 08:21:00 +0100 Message-ID: References: <86wmi4jh54.fsf@gnu.org> <86jze4j6wh.fsf@gnu.org> Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13788"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , Andrea Corallo , 73881@debbugs.gnu.org, Stefan Monnier To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 29 08:22:28 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 1t5gYb-0003PF-UR for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Oct 2024 08:22:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5gYG-0000OQ-LN; Tue, 29 Oct 2024 03:22:04 -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 1t5gYF-0000OG-B1 for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 03:22:03 -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 1t5gYE-0006pH-Ox for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 03:22:03 -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=IfKguVblNTxcDoNwL5atqhXLmq0/Xf3g8jmwyvYb5AE=; b=ZmwsNTM3gD/9OCN/MLd0uwlZ6/KtRZZEn7ERZLnNsCI0kDHmZEKXe+6tQHij+UbW/Zoq7ZAyLLJq0xLbFo01Ub7g5fWgJmtkWL5K4xgxNoOO8VaCJav6V/cnJoSzSxXpSa9ea0t9cBEhekj2R8a1fMWFmC5GZRrx9wPwR5Exokdg73ojIdYcblOa5xtW9jWT61/eG9jfMWhMhiywaLB5gXOpOz+cP3kTtlV2ZgpgicOwYNDuoS1LvusLH79qganRtbNLBnTdRptMTfYu+0NmMbxH6lIkAJeSzhGlGjFPll4AAgAVmhQPigZZ5qShQR5DqtnyAE2L2DMCPj0OJEtVJg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5gYE-0007rR-By for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 03:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Oct 2024 07:22: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.173018646630142 (code B ref 73881); Tue, 29 Oct 2024 07:22:02 +0000 Original-Received: (at 73881) by debbugs.gnu.org; 29 Oct 2024 07:21:06 +0000 Original-Received: from localhost ([127.0.0.1]:55737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5gXK-0007q6-7f for submit@debbugs.gnu.org; Tue, 29 Oct 2024 03:21:06 -0400 Original-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 ) id 1t5gXH-0007pr-Kw for 73881@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== In-Reply-To: (Stefan Kangas's message of "Mon, 28 Oct 2024 15:32:52 -0700") 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:294470 Archived-At: Stefan Kangas writes: > Stefan Monnier 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