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#64232: 28.2; Incorrect(?) byte compilation warning about =?UTF-8?Q?=E2=80=98ansi-color-apply-on-region=E2=80=99?= Date: Fri, 30 Jun 2023 09:00:33 +0300 Message-ID: <83wmzlsd4u.fsf@gnu.org> References: <874jmzs23h.wl-zack@owlfolio.org> <83o7l5yt9k.fsf@gnu.org> <9c38fe1a-ee3a-4b6d-aaa7-33aa4909e331@app.fastmail.com> <87jzvoe3qk.fsf@web.de> <87wmznhr1q.fsf@web.de> <875y751tsz.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33871"; mail-complaints-to="usenet@ciao.gmane.io" Cc: zack@owlfolio.org, 64232@debbugs.gnu.org, monnier@iro.umontreal.ca To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 30 08:01:27 2023 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 1qF7CA-0008et-IL for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Jun 2023 08:01:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qF7Bw-00029H-DH; Fri, 30 Jun 2023 02:01:12 -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 1qF7Bn-00027E-3C for bug-gnu-emacs@gnu.org; Fri, 30 Jun 2023 02:01:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qF7Bm-0006e4-I4 for bug-gnu-emacs@gnu.org; Fri, 30 Jun 2023 02:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qF7Bm-0007GU-1b for bug-gnu-emacs@gnu.org; Fri, 30 Jun 2023 02:01: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: Fri, 30 Jun 2023 06:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64232 X-GNU-PR-Package: emacs Original-Received: via spool by 64232-submit@debbugs.gnu.org id=B64232.168810481427853 (code B ref 64232); Fri, 30 Jun 2023 06:01:02 +0000 Original-Received: (at 64232) by debbugs.gnu.org; 30 Jun 2023 06:00:14 +0000 Original-Received: from localhost ([127.0.0.1]:54379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qF7B0-0007FB-Fa for submit@debbugs.gnu.org; Fri, 30 Jun 2023 02:00:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qF7Aw-0007Ds-S6 for 64232@debbugs.gnu.org; Fri, 30 Jun 2023 02:00:12 -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 1qF7Aq-00061R-F2; Fri, 30 Jun 2023 02:00:04 -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=txaziBQM/nIipVYDJHzMwsL4MtrYUL6iemhZRcKb0zM=; b=L0knh3TOcB2XBKztaQMG 4pI51CpGr48sWx+Suis5aRB7SdrRaIyXrSSAVkRqZdwVrK9TCFERpcRHCQpXDaDP3cDkuA01OZmAv scu0D2XrODCndVXhuudolNeIrjvP39NhaAV9ZGILbaG7VdIoMhBvWQ7o7VkacO7n6ghc2VwgHRB+z ZbBkx35SfbosS2B00ncgULxgoVCxilqfrYm15f4u78ffEsCDADLrxUmpsM8FSeyGu1URjQUmuPb9k BtAZdMY6CllHkyG4cdETSiBm1bs8/CNjzhnp3QLFXW7S0O9oLWWhxVNV1Nlhut1mO3IFYk1VtwDlZ UiHt2n9AAbhjaQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qF7Ap-0005Yl-FK; Fri, 30 Jun 2023 02:00:03 -0400 In-Reply-To: <875y751tsz.fsf@web.de> (message from Michael Heerdegen on Fri, 30 Jun 2023 06:02:36 +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:264305 Archived-At: > From: Michael Heerdegen > Cc: 64232@debbugs.gnu.org, eliz@gnu.org, zack@owlfolio.org > Date: Fri, 30 Jun 2023 06:02:36 +0200 > > Stefan Monnier writes: > > > Someoneā„¢ should sit down and figure out how to make `bytecomp.el` keep > > track of those things more reliably/predictably. > > In the mean time, maybe we can simply tweak `byte-compile-eval` so it > > never adds to `byte-compile-noruntime-functions` functions which have > > already been seen/declared during the current compilation? > > > > > > diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el > > index 99202185d8d..cfec4b3be06 100644 > > --- a/lisp/emacs-lisp/bytecomp.el > > +++ b/lisp/emacs-lisp/bytecomp.el > > @@ -1128,7 +1128,8 @@ byte-compile-eval > > ;; we arguably should add it to b-c-noruntime-functions, > > ;; but it's not clear it's worth the trouble > > ;; trying to recognize that case. > > - (unless (get f 'function-history) > > + (unless (or (get f 'function-history) > > + (assq f byte-compile-function-environment)) > > (push f byte-compile-noruntime-functions))))))))))))) > > Seems appropriate (and fixes this bug). > > Actually with that patch the situation looks already quite ok'ish to me. Please install this on master, and thanks.