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: Sun, 20 Oct 2024 09:08:05 +0200 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="16057"; 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 Kangas To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 20 09:09:08 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 1t2Q3n-00040f-RR for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Oct 2024 09:09:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2Q3M-0002Lg-SW; Sun, 20 Oct 2024 03:08:41 -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 1t2Q3L-0002LA-0i for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2024 03:08: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 1t2Q3K-0008QG-Nl for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2024 03:08: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:Date:References:In-Reply-To:From:To:Subject; bh=b3P7YOhzD4hWMgsjLsLMGrUS8MH7f8JGKfRc1q7Ap3M=; b=hcFerZgAgrqU3HPaGjKIpsOysweyW2ULuk/4EF4Q2GgalfiWb41+braIISBmek6Fy+HE1GLai5S/CWDn4pMsgAgmx3r1Qe8/zQHzmTRVoA1luL4qEm+ebI7NA9mXLUEZlCdKSuxQuoNu7Q3xN1Hp/YlGcGmxUH7fRwo0OVZxC2grseA1Umm0z6Fyxv5IS4W76zQlJuHcixiN7NSInWDMelEF1bIskBEsbGR0v96pp4gnE2KQx35P/kr7c99oepn7nEcfySvvSAvimk7lwy2TDdx94CrdTF7ZQwxX1dtIzWjcHvgotsUhU9quD8bvAmu9ah8PM2fol4K1vtSS5vn+pg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2Q3i-00076v-Ey for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2024 03:09: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: Sun, 20 Oct 2024 07:09: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.172940811827286 (code B ref 73881); Sun, 20 Oct 2024 07:09:02 +0000 Original-Received: (at 73881) by debbugs.gnu.org; 20 Oct 2024 07:08:38 +0000 Original-Received: from localhost ([127.0.0.1]:45552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Q3K-000762-0y for submit@debbugs.gnu.org; Sun, 20 Oct 2024 03:08:38 -0400 Original-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 ) id 1t2Q3G-00075q-0M for 73881@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== In-Reply-To: (Stefan Monnier's message of "Sat, 19 Oct 2024 22:24:57 -0400") 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:293930 Archived-At: Hi, Stefan Monnier 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