From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#46387: 28.0.50; Compiled code making a variable dynamic stopped working Date: Tue, 9 Feb 2021 17:49:20 +0100 Message-ID: References: <87h7mm79ij.fsf@web.de> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36665"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Heerdegen , 46387@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 09 17:50:15 2021 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 1l9WDO-0009OE-Qz for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Feb 2021 17:50:14 +0100 Original-Received: from localhost ([::1]:55322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9WDN-0007Mz-Nj for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Feb 2021 11:50:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9WDC-0007Lo-3G for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 11:50:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42926) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9WDB-0006sC-QR for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 11:50:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l9WDB-0005Wd-L1 for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 11:50:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Feb 2021 16:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46387 X-GNU-PR-Package: emacs Original-Received: via spool by 46387-submit@debbugs.gnu.org id=B46387.161288937521202 (code B ref 46387); Tue, 09 Feb 2021 16:50:01 +0000 Original-Received: (at 46387) by debbugs.gnu.org; 9 Feb 2021 16:49:35 +0000 Original-Received: from localhost ([127.0.0.1]:54472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9WCk-0005Vu-Om for submit@debbugs.gnu.org; Tue, 09 Feb 2021 11:49:35 -0500 Original-Received: from mail1464c50.megamailservers.eu ([91.136.14.64]:53336 helo=mail268c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9WCh-0005Vd-MB for 46387@debbugs.gnu.org; Tue, 09 Feb 2021 11:49:32 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1612889363; bh=1uZBxwdeQQU4JD/7qWSMx/ISrxwkziCLfw6avYPF+a0=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=PvyQ7CLguShQ2ODDg6zTvzvfSZ/rA0zqhIKC6wsM8N4lalevI+t5CJXUqRWuatsYP 7yviP0s5hy3Os+Ts/MFZNA1Av9992XiGYALfNif/+Oi7fUL36HMxEYCqiiWAEtXZRv SFQjDTY6ttWM6IsF49jgB+85SjvM/XdDUYSG2hCY= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail268c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 119GnKx0002257; Tue, 9 Feb 2021 16:49:23 +0000 In-Reply-To: X-Mailer: Apple Mail (2.3445.104.17) X-CTCH-RefID: str=0001.0A742F20.6022BD13.007B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=c//Vvi1l c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=iRZporoAAAAA:8 a=k-lyNX9vyvFn8KdPYc0A:9 a=CjuIK1q_8ugA:10 a=NOBgFS-JBQ2l-kSd6-zu:22 X-Origin-Country: SE 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" Xref: news.gmane.io gmane.emacs.bugs:199700 Archived-At: 9 feb. 2021 kl. 16.31 skrev Stefan Monnier : > Adding a variable to the context creates a new scope. > A `progn` should not introduce a new scope. All right, `defvar` modifies the current scope and only let, let* and = lambda create new scopes. Fine, but it leaves questions unanswered. * Does `defvar` affect new bindings only, or variable references in the = current scope as well? In (let ((my-var EXPR)) (defvar my-var) (use my-var)) does the last line refer to the lexical my-var bound in the first line, = or to the dynamic my-var? * Does the defvar have to be 'executed' to be effective? That's how the = interpreter works, but it clearly can't work in the compiler. The defvar = form probably has to 'precede' the binding form which it tries to = affect, in some way. > The (with-suppressed-warnings (...) (defvar)) form is used at > several places. It's the preferred way to declare a variable > dynamically scoped without incurring the "not prefixed" warning and > without making the `with-suppressed-warnings` silencer cover more code > than intended. Yes, but it does (currently) work if used on a single variable at a = time, which is the suggested workaround for the time being.